-
Notifications
You must be signed in to change notification settings - Fork 53
/
schema.graphqls
163 lines (136 loc) · 6.73 KB
/
schema.graphqls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# For more information on how to use these, see this wiki page:
# https://github.com/mollie/magento2/wiki/GraphQL-integration
type Mutation {
createMollieTransaction(input: MollieTransactionInput): MollieTransactionOutput @resolver(class: "\\Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\CreateMollieTransaction") @deprecated(reason: "Using the Order.mollie_redirect_url attribuut")
mollieRestoreCart(input: MollieResetCartInput): MollieResetCartOutput @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\ResetCart")
mollieProcessTransaction(input: MollieProcessTransactionInput): MollieProcessTransactionOutput @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\ProcessTransaction")
mollieApplePayValidation(
domain: String @doc(description: "The domain to validate. If this is omitted, the base url of the store is used.")
validationUrl: String! @doc(description: "The validation URL provided by Apple Pay.")
): MollieApplePayValidationOutput @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\ApplePay\\ApplePayValidation")
molliePaymentLinkRedirect(
order: String @doc(description: "The encrypted order ID that is included in the payment link url")
): MolliePaymentLinkRedirectOutput @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\PaymentLinkRedirect")
}
type Order {
mollie_redirect_url: String @resolver(class: "\\Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\PlaceOrderAndReturnRedirectUrl")
mollie_payment_token: String @resolver(class: "\\Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\PaymentToken")
}
type Cart {
mollie_available_issuers: [MollieIssuer!] @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\AvailableIssuersForCart") @doc(description: "Available issuers for the selected payment method")
}
type AvailablePaymentMethod {
mollie_available_issuers: [MollieIssuer!] @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\AvailableIssuersForMethod") @doc(description: "Available issuers for this payment method")
mollie_available_terminals: [MollieTerminalOutput!] @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\AvailableTerminalsForMethod") @doc(description: "Available terminals for this payment method")
mollie_meta: MolliePaymentMethodMeta! @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\PaymentMethodMeta") @doc(description: "Retrieve meta information for this payment method (image)")
}
type PaymentMethod {
mollie_available_issuers: [MollieIssuer!] @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\AvailableIssuersForMethod") @doc(description: "Available issuers for this payment method")
mollie_meta: MolliePaymentMethodMeta! @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\PaymentMethodMeta") @doc(description: "Retrieve meta information for this payment method (image)")
}
type SelectedPaymentMethod {
mollie_meta: MolliePaymentMethodMeta! @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\PaymentMethodMeta") @doc(description: "Retrieve meta information for this payment method (image)")
}
type CartPrices @doc(description: "Contains details about the final price of items in the cart, including discount and tax information.") {
mollie_payment_fee: MolliePaymentFee @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Cart\\Prices\\PaymentFee")
}
type StoreConfig {
mollie: MollieStoreConfig @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\General\\MollieStoreConfig") @doc(description: "Mollie store config")
}
type MollieStoreConfig {
profile_id: String @doc(description: "The profile ID used for this store")
live_mode: Boolean @doc(description: "Is Mollie running in live mode?")
}
type MollieIssuer {
name: String
code: String
image: String
svg: String
}
type MolliePaymentMethodMeta {
image: String
}
type MolliePaymentMethod {
code: String
name: String
image: String
}
type Query {
mollieCustomerOrder (
hash: String @doc(description: "The hash added to your custom URL")
): CustomerOrder @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\Checkout\\MollieCustomerOrder")
molliePaymentMethods(input: MolliePaymentMethodsInput): MolliePaymentMethodsOutput @resolver(class: "Mollie\\Payment\\GraphQL\\Resolver\\General\\MolliePaymentMethods") @cache(cacheIdentity: "Mollie\\Payment\\GraphQL\\Resolver\\Cache\\PaymentMethodsCache")
}
type MollieTerminalOutput {
id: String!
brand: String!
model: String!
serialNumber: String
description: String!
}
type MollieResetCartOutput {
cart: Cart!
}
type MolliePaymentMethodsOutput {
methods: [MolliePaymentMethod]
}
type MollieTransactionOutput {
checkout_url: String
}
type MollieProcessTransactionOutput {
paymentStatus: PaymentStatusEnum
cart: Cart @doc(description: "The cart is only available when the payment status is failed, canceled or expired.")
redirect_to_cart: Boolean @doc(description: "Indicates if the customer should be redirected to the cart.")
redirect_to_success_page: Boolean @doc(description: "Indicates if the customer should be redirected to the success page.")
}
type MolliePaymentFee {
fee: Money @doc(description: "Mollie payment fee")
base_fee: Money @doc(description: "Base mollie payment fee")
fee_tax: Money @doc(description: "Mollie payment fee tax")
base_fee_tax: Money @doc(description: "Base mollie payment fee tax")
}
type MollieApplePayValidationOutput {
response: String!
}
type MolliePaymentLinkRedirectOutput {
redirect_url: String
already_paid: Boolean!
is_expired: Boolean!
}
input PaymentMethodInput {
mollie_applepay_payment_token: String @doc(description: "The Apple Pay payment token")
mollie_card_token: String @doc(description: "The card token provided by Mollie Components")
mollie_selected_issuer: String @doc(description: "Provided the issuer chosen by the end-user")
mollie_selected_terminal: String @doc(description: "Provided the terminal chosen")
}
input MollieTransactionInput {
payment_token: String!
issuer: String
}
input MolliePaymentMethodsInput {
amount: Float! = 10
currency: String = EUR
}
input MollieResetCartInput {
cart_id: String! @doc(description: "The unique ID that identifies the customer's cart")
}
input MollieProcessTransactionInput {
payment_token: String! @doc(description: "The payment token returned from the PlaceOrder call/added to the return URL")
}
input PlaceOrderInput {
mollie_return_url: String @doc(description: "Optionally send a URL where the visitor is returned after completing the Mollie order")
}
enum PaymentStatusEnum {
CREATED
PAID
AUTHORIZED
CANCELED
SHIPPING
COMPLETED
EXPIRED
PENDING
REFUNDED
ERROR
FAILED
OPEN
}