extra params
This commit is contained in:
parent
03f387487f
commit
a23efe668a
@ -21,6 +21,7 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
01C851CF23CF7B260021F976 /* JSONMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01C851CE23CF7B260021F976 /* JSONMap.swift */; };
|
||||
01DF561421F90ADC00CC099B /* Dictionary+MFConvenience.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01DF561321F90ADC00CC099B /* Dictionary+MFConvenience.swift */; };
|
||||
01F2A03623A80A7300D954D8 /* ActionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2A03523A80A7300D954D8 /* ActionProtocol.swift */; };
|
||||
01F2A03923A812DD00D954D8 /* ActionOpenUrl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2A03823A812DD00D954D8 /* ActionOpenUrl.swift */; };
|
||||
@ -164,6 +165,7 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
01C851CE23CF7B260021F976 /* JSONMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONMap.swift; sourceTree = "<group>"; };
|
||||
01DF561321F90ADC00CC099B /* Dictionary+MFConvenience.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dictionary+MFConvenience.swift"; sourceTree = "<group>"; };
|
||||
01F2A03523A80A7300D954D8 /* ActionProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionProtocol.swift; sourceTree = "<group>"; };
|
||||
01F2A03823A812DD00D954D8 /* ActionOpenUrl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionOpenUrl.swift; sourceTree = "<group>"; };
|
||||
@ -437,6 +439,7 @@
|
||||
children = (
|
||||
946EE1AF237B5EF70036751F /* JSONHelper.swift */,
|
||||
946EE1B1237B5F260036751F /* JSONValue.swift */,
|
||||
01C851CE23CF7B260021F976 /* JSONMap.swift */,
|
||||
);
|
||||
path = JSON;
|
||||
sourceTree = "<group>";
|
||||
@ -878,6 +881,7 @@
|
||||
AFBB96991FBA3A9A0008D868 /* MVMCoreAlertController.m in Sources */,
|
||||
881D26941FCC9D180079C521 /* MVMCoreOperation.m in Sources */,
|
||||
AFED77A41FCCA29400BAE689 /* MVMCoreViewControllerMappingObject.m in Sources */,
|
||||
01C851CF23CF7B260021F976 /* JSONMap.swift in Sources */,
|
||||
01F2A04C23A82B1B00D954D8 /* ActionCall.swift in Sources */,
|
||||
8876D5ED1FB50AB000EB2E3D /* NSDictionary+MFConvenience.m in Sources */,
|
||||
AFBB968C1FBA3A9A0008D868 /* MVMCoreDismissViewControllerOperation.m in Sources */,
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionCall: ActionProtocol {
|
||||
public static var identifier: String = "call"
|
||||
public var callNumber: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(callNumber: String) {
|
||||
self.callNumber = callNumber
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionOpenApp: ActionProtocol {
|
||||
public static var identifier: String = "openApp"
|
||||
public var appUrl: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(appUrl: String) {
|
||||
self.appUrl = appUrl
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionOpenPage: ActionProtocol {
|
||||
public static var identifier: String = "openPage"
|
||||
public var pageType: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(pageType: String) {
|
||||
self.pageType = pageType
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionOpenUrl: ActionProtocol {
|
||||
public static var identifier: String = "openUrl"
|
||||
public var browserUrl: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(browserUrl: String) {
|
||||
self.browserUrl = browserUrl
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionPopup: ActionProtocol {
|
||||
public static var identifier: String = "popup"
|
||||
public var pageType: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(pageType: String) {
|
||||
self.pageType = pageType
|
||||
}
|
||||
|
||||
@ -14,6 +14,8 @@ public enum ActionCodingKey: String, CodingKey {
|
||||
|
||||
public protocol ActionProtocol: Model {
|
||||
var actionType: String? { get }
|
||||
var extraParameter: JSONValueDictionary? { get set }
|
||||
var analyticsData: JSONValueDictionary? { get set }
|
||||
}
|
||||
|
||||
extension ActionProtocol {
|
||||
|
||||
@ -11,6 +11,8 @@ import Foundation
|
||||
@objcMembers public class ActionTopAlert: ActionProtocol {
|
||||
public static var identifier: String = "topAlert"
|
||||
public var pageType: String
|
||||
public var extraParameter: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public init(pageType: String) {
|
||||
self.pageType = pageType
|
||||
}
|
||||
|
||||
31
MVMCore/MVMCore/Models/JSON/JSONMap.swift
Normal file
31
MVMCore/MVMCore/Models/JSON/JSONMap.swift
Normal file
@ -0,0 +1,31 @@
|
||||
//
|
||||
// JSONMap.swift
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Suresh, Kamlesh on 1/15/20.
|
||||
// Copyright © 2020 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@propertyWrapper
|
||||
public struct JSONMap {
|
||||
public var wrappedValue: JSONValueDictionary
|
||||
|
||||
public init(wrappedValue value: JSONValueDictionary) {
|
||||
self.wrappedValue = value
|
||||
}
|
||||
}
|
||||
|
||||
extension JSONMap: Codable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.singleValueContainer()
|
||||
self.wrappedValue = try typeContainer.decode(JSONValueDictionary.self)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.singleValueContainer()
|
||||
try container.encode(wrappedValue)
|
||||
}
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MVMCoreRequestParameters.h"
|
||||
|
||||
#define ENABLE_HARD_CODED_RESPONSE 0 && DEBUG
|
||||
#define ENABLE_HARD_CODED_RESPONSE 1 && DEBUG
|
||||
|
||||
#if ENABLE_HARD_CODED_RESPONSE
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user