Push-Definitions/Sources/PushAPI/DeviceUpdate.swift
2022-06-05 18:25:39 +02:00

25 lines
638 B
Swift

import Foundation
/**
An object to update the push token of a device.
*/
public struct PushTokenUpdate: Codable {
/// The authentication of the requesting device.
public let device: DeviceAuthentication
/// The new push token to register
public let newToken: PushToken
/**
Create a device authentication object.
- Parameter device: The authentication of the device requesting the change.
- Parameter PushToken: The new APNs token to use from now on
*/
public init(device: DeviceAuthentication, newToken: PushToken) {
self.device = device
self.newToken = newToken
}
}