Skip to content

Commit

Permalink
1.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-huynh-tamara committed Apr 16, 2024
1 parent 87c042f commit 708b962
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions Example/Example/InfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct InfoView : View {
tamara.initialize(token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhY2NvdW50SWQiOiJmY2ZiYzk3ZC0wYmIwLTRkYTItYmY3ZS02MjhlOTRkMzM0M2EiLCJ0eXBlIjoibWVyY2hhbnQiLCJzYWx0IjoiNzQxMmZkZjI1NGZiMWJhNmY5N2FmMmY1N2YxYzA1MDYiLCJpYXQiOjE2Nzc4MzIzNzQsImlzcyI6IlRhbWFyYSJ9.WVn2sf3LrW_YI3c2pNrbcOa--tRDAVm9p2GOBRdn7d671QIuqPvDgI9Gz7MNzBirUDnVLATCrL9uvMxDY_1OzXe3Sn1Gawckw-NE2EfL_Kjnl8GcNqwMcMvcin9XGxGRhbDDusgFCFzxaiEYae3DpA-pO0TpyQbEXl49ZLT4a9sEW75Taxc2ofZ-DJ_ciblImk1aJ6p9YhQowvzAVHz6yG-ZRfosxc96t8BK15bVTvTLnT9hzEnCqifqKO7vSu1e2mKEG8lC46pZHSr-ZpvfjSytrMX2QAZuXqxtlvbg3aRZeGiJ-SKVcbRdlId1wSRTZ5lntrw3pyrLS1dpxcfSOA", apiUrl: "https://api-sandbox.tamara.co", pushUrl: "https://tamara.co/pushnotification", publishKey: "d36c6279-90c2-4239-b4e2-2c91bfda0fe4", notificationToken: "aeae44a2-5f57-475e-a384-0e9b8a802326", isSandbox: true)
tamara.createOrder(orderReferenceId: "A352BB0A59044C77928A7551A1EA566B", description: "String")
tamara.setInstalments(instalments: 1)
tamara.setPlatform(platform: "Ios")
tamara.setLocale(locale: "en-US")
let riskValidate = tamara.setRiskAssessment(jsonData: self.$appState.riskAssessment.wrappedValue)
if (!riskValidate) {
Expand Down
2 changes: 1 addition & 1 deletion TamaraSDK/TamaraSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = "TamaraSDK"
s.version = "1.0.12"
s.version = "1.0.13"
s.summary = "SDK for tamara.co"
s.description = "iOS sdk for tamara.co"
s.homepage = "https://tamara.co"
Expand Down
12 changes: 12 additions & 0 deletions TamaraSDK/TamaraSDK/TamaraSDKPayment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ public extension TamaraSDKPayment {
} catch {
}
}

/**
* Set Platform
* @param platform
*/
func setPlatform(platform: String) {
do {
try validateStateForAddingData()
self.order?.platform = platform
} catch {
}
}

/**
* Set Locale
Expand Down
2 changes: 1 addition & 1 deletion TamaraSDK/TamaraSDK/model/Order.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct Order: Codable {
var shippingAmount: Amount? = nil
var taxAmount: Amount? = nil
var totalAmount: Amount? = nil
var platform: String? = nil
var platform: String? = "IOS"
var isMobile: Bool? = nil
var instalments: Int? = nil
var orderNumber: String? = nil
Expand Down
2 changes: 1 addition & 1 deletion TamaraSDK/TamaraSDK/model/response/AvailablePayment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
public struct AvailablePayment: Codable {
var payment_type: String? = nil
var description: String? = nil
var description_en: String? = nil
var description_ar: String? = nil
var instalment: Int? = 0

Expand Down

0 comments on commit 708b962

Please sign in to comment.