76 lines
1.8 KiB
Swift
76 lines
1.8 KiB
Swift
//
|
|
// P2POrdersGraphQLRequest.swift
|
|
// Wallet
|
|
//
|
|
// Created by Saveliy Stavitsky on 7/9/21.
|
|
// Copyright © 2021 AM. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct P2POrdersGraphQLRequest: Encodable {
|
|
|
|
struct ResponseData: Decodable { let allOrders: Response? }
|
|
struct Response: Decodable {
|
|
let orders: [P2POrder]?
|
|
let errors: String?
|
|
}
|
|
|
|
struct Variables: Encodable {
|
|
let signature: String
|
|
}
|
|
|
|
let variables: Variables
|
|
let operationName = "allOrders"
|
|
let query: String = #"""
|
|
query allOrders(
|
|
$signature: String!
|
|
) {
|
|
allOrders(
|
|
signature: $signature
|
|
) {
|
|
orders {
|
|
order_id
|
|
uuid
|
|
data_type
|
|
token
|
|
owner
|
|
status
|
|
volume
|
|
insurance
|
|
volume_balance
|
|
insurance_balance
|
|
min_package
|
|
max_package
|
|
data
|
|
order_type
|
|
created_at
|
|
backend_data
|
|
rating {
|
|
completed_deals
|
|
failed_deals
|
|
}
|
|
|
|
currency_id
|
|
rate
|
|
is_cash_rate
|
|
card_number
|
|
payment_url
|
|
wallet_number
|
|
wallet_address
|
|
blockchain_id
|
|
payment_system_id
|
|
country_id
|
|
city_id
|
|
bank_ids
|
|
card_name
|
|
card_expiry
|
|
cvv
|
|
memo
|
|
}
|
|
errors
|
|
}
|
|
}
|
|
"""#
|
|
}
|