Skip to content

Commit

Permalink
Merge pull request #30 from StreamAMG/release/1.3.1
Browse files Browse the repository at this point in the history
Fixed purchase amount field
  • Loading branch information
StefanoStream authored Mar 14, 2024
2 parents 65322bd + 6d2aee8 commit 7b6cd2f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Change Log:

All notable changes to this project will be documented in this section.

### 1.3.1
- Fixed Amount field that caused Sign up error
- Changed error log message with more details
- Fixed issue with Cloudpay login for paid users

### 1.3.0
- Updated Authentication module with new methods validate active session with third party JWT tokens.
- Added a new fail callback to handle cases where the purchase was successful but the data is invalid.
Expand Down
14 changes: 7 additions & 7 deletions Source/StreamSDKAuthentication/Models/UserSummaryResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public struct UserSummaryResponse: Codable {

// MARK: - BillingDetails
public struct BillingDetails: Codable {
public let addressCountry, addressCity, addressLine1, addressLine2: String
public let addressState, addressZip: String
public let cardDetails: CardDetails
public let addressCountry, addressCity, addressLine1, addressLine2: String?
public let addressState, addressZip: String?
public let cardDetails: CardDetails?

enum CodingKeys: String, CodingKey {
case addressCountry = "AddressCountry"
Expand All @@ -50,8 +50,8 @@ public struct BillingDetails: Codable {

// MARK: - CardDetails
public struct CardDetails: Codable {
public let provider, reference, country: String
public let expires: Date
public let provider, reference, country: String?
public let expires: String?

enum CodingKeys: String, CodingKey {
case provider = "Provider"
Expand All @@ -63,7 +63,7 @@ public struct CardDetails: Codable {

// MARK: - CustomField
public struct CustomField: Codable {
public let id, label: String
public let id, label: String?
public let customFieldRequired: Bool
public let value: String?

Expand Down Expand Up @@ -100,7 +100,7 @@ public struct Subscription: Codable {
public struct Package: Codable {
public let id, name, title, packageDescription: String?
public let type: String?
public let amount: Int?
public let amount: Double?
public let currencyCode, interval, duration: String?
public let trialDuration: String?
public let hasFreeTrial : Bool?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extension StreamAMGSDK{
let responseObject = try JSONDecoder().decode(T.self, from: data)
completion?(.success(responseObject))
} catch {
let streamError = StreamAMGError.init(message: error.localizedDescription)
let streamError = StreamAMGError.init(message: String(describing: error))
if let httpResponse = response as? HTTPURLResponse {
streamError.code = httpResponse.statusCode
}
Expand Down
2 changes: 1 addition & 1 deletion StreamAMGSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

spec.name = "StreamAMGSDK"
spec.version = "1.3.0"
spec.version = "1.3.1"
spec.summary = "Stream AMG SDK"
spec.swift_versions = "5"

Expand Down

0 comments on commit 7b6cd2f

Please sign in to comment.