-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add #67: Create Repositories for each API in bb consent and sub tickets:
- Loading branch information
1 parent
6f99f32
commit 8fbced4
Showing
27 changed files
with
362 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 36 additions & 27 deletions
63
PrivacyDashboardiOS/Classes/Model/Organisation/Consent.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
// | ||
// Consent.swift | ||
// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport | ||
// Consent.swift | ||
// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport | ||
|
||
import Foundation | ||
import Foundation | ||
import SwiftyJSON | ||
|
||
class Consent { | ||
class Consent: ConsentWrapper { | ||
|
||
var data : String! | ||
var iD : String! | ||
var orgID : String! | ||
var status : Status! | ||
var userID : String! | ||
var value : String! | ||
var data : String? | ||
var iD : String? | ||
var orgID : String? | ||
var status : StatusWrapper? | ||
var userID : String? | ||
var value : String? | ||
|
||
|
||
/** | ||
* Instantiate the instance using the passed json values to set the properties values | ||
*/ | ||
init(fromJson json: JSON!) { | ||
if json.isEmpty{ | ||
return | ||
} | ||
data = json["Data"].stringValue | ||
iD = json["ID"].stringValue | ||
orgID = json["OrgID"].stringValue | ||
let statusJson = json["Status"] | ||
if !statusJson.isEmpty{ | ||
status = Status(fromJson: statusJson) | ||
} | ||
userID = json["UserID"].stringValue | ||
value = json["Value"].stringValue | ||
} | ||
/** | ||
* Instantiate the instance using the passed json values to set the properties values | ||
*/ | ||
init(fromJson json: JSON!) { | ||
if json.isEmpty{ | ||
return | ||
} | ||
data = json["Data"].stringValue | ||
iD = json["ID"].stringValue | ||
orgID = json["OrgID"].stringValue | ||
let statusJson = json["Status"] | ||
if !statusJson.isEmpty{ | ||
status = Status(fromJson: statusJson) | ||
} | ||
userID = json["UserID"].stringValue | ||
value = json["Value"].stringValue | ||
} | ||
} | ||
|
||
protocol ConsentWrapper { | ||
var data : String? { get } | ||
var iD : String? { get } | ||
var orgID : String? { get } | ||
var status : StatusWrapper? { get } | ||
var userID : String? { get } | ||
var value : String? { get } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 20 additions & 17 deletions
37
PrivacyDashboardiOS/Classes/Model/Organisation/Count.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
// | ||
// Count.swift | ||
// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport | ||
// Count.swift | ||
// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport | ||
|
||
import Foundation | ||
import Foundation | ||
import SwiftyJSON | ||
|
||
class Count { | ||
|
||
var consented : Int! | ||
var total : Int! | ||
class Count: CountWrapper { | ||
var consented : Int? | ||
var total : Int? | ||
|
||
/** | ||
* Instantiate the instance using the passed json values to set the properties values | ||
*/ | ||
init(fromJson json: JSON!) { | ||
if json.isEmpty{ | ||
return | ||
} | ||
consented = json["Consented"].intValue | ||
total = json["Total"].intValue | ||
} | ||
} | ||
|
||
/** | ||
* Instantiate the instance using the passed json values to set the properties values | ||
*/ | ||
init(fromJson json: JSON!) { | ||
if json.isEmpty{ | ||
return | ||
} | ||
consented = json["Consented"].intValue | ||
total = json["Total"].intValue | ||
} | ||
protocol CountWrapper { | ||
var consented : Int? { get } | ||
var total : Int? { get } | ||
} |
Oops, something went wrong.