-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGr4vyCartItem.swift
More file actions
37 lines (34 loc) · 1.2 KB
/
Gr4vyCartItem.swift
File metadata and controls
37 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Gr4vy5.swift
// gr4vy-ios
//
import Foundation
public struct Gr4vyCartItem: Codable {
let name: String
let quantity: Int
let unitAmount: Int
let discountAmount: Int?
let taxAmount: Int?
var externalIdentifier:String? = nil
var sku: String? = nil
var productUrl: String? = nil
var imageUrl: String? = nil
var categories: [String]? = nil
var productType: String? = nil
var sellerCountry: String? = nil
public init(name: String, quantity: Int, unitAmount: Int, discountAmount: Int? = 0, taxAmount: Int? = 0,
externalIdentifier: String? = nil, sku: String? = nil, productUrl: String? = nil, imageUrl: String? = nil, categories: [String]? = nil, productType: String? = nil, sellerCountry: String? = nil) {
self.name = name
self.quantity = quantity
self.unitAmount = unitAmount
self.discountAmount = discountAmount
self.taxAmount = taxAmount
self.externalIdentifier = externalIdentifier
self.sku = sku
self.productUrl = productUrl
self.imageUrl = imageUrl
self.categories = categories
self.productType = productType
self.sellerCountry = sellerCountry
}
}