Skip to content

Commit

Permalink
Public release 1.11.3
Browse files Browse the repository at this point in the history
Public release 1.11.3
  • Loading branch information
EugeneIOs committed Dec 6, 2022
2 parents a3dfab4 + 4a45f99 commit 0ff481d
Show file tree
Hide file tree
Showing 174 changed files with 7,617 additions and 16,007 deletions.
5 changes: 5 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Bin length expanded from 6 to 8 digits for [Visa](https://ht.visa.com/dam/VCOM/g
### Migrating from versions < v1.9.7
#### Swift PM modules updates.
For SDK integration with Swift Package Manager you don't need to import `VGSPaymentCards` module.
### Migrating from versions < v1.11.3

Before:

Expand Down Expand Up @@ -161,3 +162,7 @@ let expDateConfiguration = VGSConfiguration(collector: vgsCollect, fieldName: "c
expDateConfiguration.type = .expDate
expDateConfiguration.divider = ""
```

### Migrating from versions < v1.11.3
#### Rename enum
`HTTPMethod` -> `VGSCollectHTTPMethod`
4 changes: 2 additions & 2 deletions Sources/VGSCollectSDK/Core/API/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class APIClient {

// MARK: - Send request

func sendRequest(path: String, method: HTTPMethod = .post, routeId: String? = nil, value: BodyData, completion block: ((_ response: VGSResponse) -> Void)? ) {
func sendRequest(path: String, method: VGSCollectHTTPMethod = .post, routeId: String? = nil, value: BodyData, completion block: ((_ response: VGSResponse) -> Void)? ) {

let sendRequestBlock: (URL?) -> Void = {url in
guard var requestURL = url else {
Expand Down Expand Up @@ -172,7 +172,7 @@ class APIClient {
}
}

private func sendRequest(to url: URL, method: HTTPMethod = .post, value: BodyData, completion block: ((_ response: VGSResponse) -> Void)? ) {
private func sendRequest(to url: URL, method: VGSCollectHTTPMethod = .post, value: BodyData, completion block: ((_ response: VGSResponse) -> Void)? ) {

// Add headers.
var headers = APIClient.defaultHttpHeaders
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// HTTPMethod.swift
// VGSCollectHTTPMethod.swift
// VGSCollectSDK
//
// Created on 16.02.2021.
Expand All @@ -18,7 +18,7 @@ public typealias HTTPHeaders = [String: String]
internal typealias BodyData = [String: Any]

/// HTTP request methods
public enum HTTPMethod: String {
public enum VGSCollectHTTPMethod: String {
/// GET method.
case get = "GET"
/// POST method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class VGSAnalyticsClient {
internal extension VGSAnalyticsClient {

// send events
func sendAnalyticsRequest(method: HTTPMethod = .post, path: String = "vgs", data: [String: Any] ) {
func sendAnalyticsRequest(method: VGSCollectHTTPMethod = .post, path: String = "vgs", data: [String: Any] ) {

// Check if tracking events enabled
guard shouldCollectAnalytics else {
Expand Down
8 changes: 4 additions & 4 deletions Sources/VGSCollectSDK/Core/Collector/VGSCollect+network.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension VGSCollect {
- Parameters:
- path: Inbound rout path for your organization vault.
- method: HTTPMethod, default is `.post`.
- method: VGSCollectHTTPMethod, default is `.post`.
- routeId: id of VGS Proxy Route, default is `nil`.
- extraData: Any data you want to send together with data from VGSTextFields , default is `nil`.
- requestOptions: `VGSCollectRequestOptions` object, holds additional request options. Default options are `.nestedJSON`.
Expand All @@ -24,7 +24,7 @@ extension VGSCollect {
- Note:
Errors can be returned in the `NSURLErrorDomain` and `VGSCollectSDKErrorDomain`.
*/
public func sendData(path: String, method: HTTPMethod = .post, routeId: String? = nil, extraData: [String: Any]? = nil, requestOptions: VGSCollectRequestOptions = VGSCollectRequestOptions(), completion block: @escaping (VGSResponse) -> Void) {
public func sendData(path: String, method: VGSCollectHTTPMethod = .post, routeId: String? = nil, extraData: [String: Any]? = nil, requestOptions: VGSCollectRequestOptions = VGSCollectRequestOptions(), completion block: @escaping (VGSResponse) -> Void) {

// Content analytics.
var content: [String] = ["textField"]
Expand Down Expand Up @@ -80,7 +80,7 @@ extension VGSCollect {
- Note:
Errors can be returned in the `NSURLErrorDomain` and `VGSCollectSDKErrorDomain`.
*/
public func sendFile(path: String, method: HTTPMethod = .post, routeId: String? = nil, extraData: [String: Any]? = nil, completion block: @escaping (VGSResponse) -> Void) {
public func sendFile(path: String, method: VGSCollectHTTPMethod = .post, routeId: String? = nil, extraData: [String: Any]? = nil, completion block: @escaping (VGSResponse) -> Void) {

var content: [String] = ["file"]
if !(extraData?.isEmpty ?? true) {
Expand Down Expand Up @@ -181,7 +181,7 @@ extension VGSCollect {
public func tokenizeData(routeId: String? = nil, completion block: @escaping (VGSTokenizationResponse) -> Void) {
// Default request params
let path = "tokens"
let method = HTTPMethod.post
let method = VGSCollectHTTPMethod.post

// Check fields validation status
if let error = validateStoredInputData() {
Expand Down
3 changes: 2 additions & 1 deletion Sources/VGSCollectSDK/Utils/Extensions/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
@testable import VGSCollectSDK

/// Merge two <key:value> objects and their nested values. Returns [String: Any]. Values in d2 will override values in d1 if keys are same!!!!
func deepMerge(_ d1: [String: Any], _ d2: [String: Any]) -> [String: Any] {
Expand Down Expand Up @@ -46,7 +47,7 @@ internal class Utils {

/// VGS Collect SDK Version.
/// Necessary since SPM doesn't track info plist correctly: https://forums.swift.org/t/add-info-plist-on-spm-bundle/40274/5
static let vgsCollectVersion: String = "1.11.2"
static let vgsCollectVersion: String = "1.11.3"
}

extension Dictionary {
Expand Down
2 changes: 1 addition & 1 deletion VGSCollectSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'VGSCollectSDK'
spec.version = '1.11.2'
spec.version = '1.11.3'
spec.summary = 'VGS Collect - is a product suite that allows customers to collect information securely without possession of it.'
spec.swift_version = '5.0'
spec.description = <<-DESC
Expand Down
18 changes: 10 additions & 8 deletions VGSCollectSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
035179A72859BCC400394BFC /* VGSCardHolderNameTokenizationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035179A62859BCC400394BFC /* VGSCardHolderNameTokenizationConfiguration.swift */; };
035179A92859BD5500394BFC /* VGSTokenizationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 035179A82859BD5500394BFC /* VGSTokenizationConfiguration.swift */; };
038EDA0D286F2EFF00AF3CF2 /* TokenizationApiTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038EDA0C286F2EFF00AF3CF2 /* TokenizationApiTests.swift */; };
03DDAAF928632DF800337BA8 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26CD25DB88C50099AA3A /* HTTPMethod.swift */; };
32059CD02417E02E003E9481 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32059CCF2417E02E003E9481 /* Utils.swift */; };
32059CD12417E02E003E9481 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32059CCF2417E02E003E9481 /* Utils.swift */; };
32059CD42417EACC003E9481 /* UtilsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32059CD22417EACC003E9481 /* UtilsTest.swift */; };
Expand Down Expand Up @@ -95,13 +94,14 @@
44168FBF2632945D0088E515 /* VGSExpirationDateTextFieldUtilsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44168FBE2632945D0088E515 /* VGSExpirationDateTextFieldUtilsTests.swift */; };
441A727D272AAEEA0036BECB /* TextFieldMaxInputLengthTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441A727C272AAEEA0036BECB /* TextFieldMaxInputLengthTests.swift */; };
441B26D225DB88C50099AA3A /* APIClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26CC25DB88C50099AA3A /* APIClient.swift */; };
441B26D325DB88C50099AA3A /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26CD25DB88C50099AA3A /* HTTPMethod.swift */; };
441B26D425DB88C50099AA3A /* APIHostURLPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26CF25DB88C50099AA3A /* APIHostURLPolicy.swift */; };
441B26D525DB88C50099AA3A /* APIHostnameValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26D025DB88C50099AA3A /* APIHostnameValidator.swift */; };
441B26D625DB88C50099AA3A /* APICustomHostStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26D125DB88C50099AA3A /* APICustomHostStatus.swift */; };
441B26DD25DB88DB0099AA3A /* VGSResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26DC25DB88DB0099AA3A /* VGSResponse.swift */; };
441B26E925DB8D950099AA3A /* APIClient+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26E825DB8D950099AA3A /* APIClient+Utils.swift */; };
441B26F025DB956B0099AA3A /* URL+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B26EF25DB956B0099AA3A /* URL+Extensions.swift */; };
441B4E9B293EFD050011EFAC /* VGSCollectHTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B4E9A293EFD050011EFAC /* VGSCollectHTTPMethod.swift */; };
441B4E9D293EFD2B0011EFAC /* VGSCollectHTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 441B4E9C293EFD2B0011EFAC /* VGSCollectHTTPMethod.swift */; };
442A39132909718F007CCC58 /* VGSTokenizationTestJSON_DefaultConfig.json in Resources */ = {isa = PBXBuildFile; fileRef = 442A39122909718F007CCC58 /* VGSTokenizationTestJSON_DefaultConfig.json */; };
442A391729097425007CCC58 /* VGSTokenizationResponseMappingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 442A391629097425007CCC58 /* VGSTokenizationResponseMappingTests.swift */; };
442BB2C6287314DC001FD26B /* MockedData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 442BB2C5287314DC001FD26B /* MockedData.plist */; };
Expand Down Expand Up @@ -291,13 +291,14 @@
44168FBE2632945D0088E515 /* VGSExpirationDateTextFieldUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VGSExpirationDateTextFieldUtilsTests.swift; sourceTree = "<group>"; };
441A727C272AAEEA0036BECB /* TextFieldMaxInputLengthTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldMaxInputLengthTests.swift; sourceTree = "<group>"; };
441B26CC25DB88C50099AA3A /* APIClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIClient.swift; sourceTree = "<group>"; };
441B26CD25DB88C50099AA3A /* HTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = "<group>"; };
441B26CF25DB88C50099AA3A /* APIHostURLPolicy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIHostURLPolicy.swift; sourceTree = "<group>"; };
441B26D025DB88C50099AA3A /* APIHostnameValidator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIHostnameValidator.swift; sourceTree = "<group>"; };
441B26D125DB88C50099AA3A /* APICustomHostStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APICustomHostStatus.swift; sourceTree = "<group>"; };
441B26DC25DB88DB0099AA3A /* VGSResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VGSResponse.swift; sourceTree = "<group>"; };
441B26E825DB8D950099AA3A /* APIClient+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APIClient+Utils.swift"; sourceTree = "<group>"; };
441B26EF25DB956B0099AA3A /* URL+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Extensions.swift"; sourceTree = "<group>"; };
441B4E9A293EFD050011EFAC /* VGSCollectHTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VGSCollectHTTPMethod.swift; path = Sources/VGSCollectSDK/Core/API/VGSCollectHTTPMethod.swift; sourceTree = SOURCE_ROOT; };
441B4E9C293EFD2B0011EFAC /* VGSCollectHTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = VGSCollectHTTPMethod.swift; path = Sources/VGSCollectSDK/Core/API/VGSCollectHTTPMethod.swift; sourceTree = SOURCE_ROOT; };
442A39122909718F007CCC58 /* VGSTokenizationTestJSON_DefaultConfig.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = VGSTokenizationTestJSON_DefaultConfig.json; sourceTree = "<group>"; };
442A391629097425007CCC58 /* VGSTokenizationResponseMappingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VGSTokenizationResponseMappingTests.swift; sourceTree = "<group>"; };
442BB2C5287314DC001FD26B /* MockedData.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = MockedData.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -677,7 +678,6 @@
441B26CC25DB88C50099AA3A /* APIClient.swift */,
44F8F51A25DBD1860052647A /* SatelliteUtils */,
441B26CE25DB88C50099AA3A /* APIHostName */,
441B26CD25DB88C50099AA3A /* HTTPMethod.swift */,
441B26DC25DB88DB0099AA3A /* VGSResponse.swift */,
441B26E825DB8D950099AA3A /* APIClient+Utils.swift */,
);
Expand All @@ -687,6 +687,8 @@
441B26CE25DB88C50099AA3A /* APIHostName */ = {
isa = PBXGroup;
children = (
441B4E9A293EFD050011EFAC /* VGSCollectHTTPMethod.swift */,
441B4E9C293EFD2B0011EFAC /* VGSCollectHTTPMethod.swift */,
441B26CF25DB88C50099AA3A /* APIHostURLPolicy.swift */,
441B26D025DB88C50099AA3A /* APIHostnameValidator.swift */,
441B26D125DB88C50099AA3A /* APICustomHostStatus.swift */,
Expand Down Expand Up @@ -1548,10 +1550,11 @@
441B26DD25DB88DB0099AA3A /* VGSResponse.swift in Sources */,
325AB9CB2420C5410024134B /* VGSFilePickerControllerDelegate.swift in Sources */,
328B5C7023C8DA2600A39515 /* String+extension.swift in Sources */,
441B26D325DB88C50099AA3A /* HTTPMethod.swift in Sources */,
32093D7D25CD9F88006CD242 /* VGSCollectLogEvent.swift in Sources */,
44ECD60427D9C18C00460FDF /* CheckSumAlgoritmType.swift in Sources */,
3215C4BC260DAF3D00F21259 /* VGSFormatSerializerProtocol.swift in Sources */,
441B4E9B293EFD050011EFAC /* VGSCollectHTTPMethod.swift in Sources */,
441B4E9D293EFD2B0011EFAC /* VGSCollectHTTPMethod.swift in Sources */,
32093D8625CDA3E6006CD242 /* VGSReadWriteSafeContainer.swift in Sources */,
FD3C01C323AFC0980096B4A4 /* VGSTextField+CVC.swift in Sources */,
44F8F51C25DBD1950052647A /* VGSCollectSatelliteUtils.swift in Sources */,
Expand Down Expand Up @@ -1639,7 +1642,6 @@
FDE247CD2467439D008D75B0 /* ApiClientTests.swift in Sources */,
44A67DDB25DCE3D100906957 /* VGSAPIClientSatelliteTests.swift in Sources */,
FDA680DF239844FC00372817 /* CardTextFieldTests.swift in Sources */,
03DDAAF928632DF800337BA8 /* HTTPMethod.swift in Sources */,
44447F8025F7651100D4CE68 /* JSONData+Extensions.swift in Sources */,
32F23A7924B752E200E389F7 /* PaymentCardsTest.swift in Sources */,
FDAAB6AD249A9257001F5C1A /* FileInfoTest.swift in Sources */,
Expand Down Expand Up @@ -2051,7 +2053,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.11.2;
MARKETING_VERSION = 1.11.3;
PRODUCT_BUNDLE_IDENTIFIER = com.vgs.framework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2087,7 +2089,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.11.2;
MARKETING_VERSION = 1.11.3;
PRODUCT_BUNDLE_IDENTIFIER = com.vgs.framework;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Loading

0 comments on commit 0ff481d

Please sign in to comment.