Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OCBC Digital logo #238

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OmiseSDK/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ extension Client {
// swiftlint:disable:next function_body_length
private static func completeRequest<T: Object>(_ request: Request<T>, callback: Request<T>.Callback?) -> ((Data?, URLResponse?, Error?) -> Void) {
// swiftlint:disable:next closure_body_length
return { (data: Data?, response: URLResponse?, error: Error?) -> Void in
aashishgurung marked this conversation as resolved.
Show resolved Hide resolved
return { (data: Data?, response: URLResponse?, error: Error?) in
guard let callback = callback else { return } // nobody around to hear the leaf falls

var result: RequestResult<T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "ocbc_digital.png",
"filename" : "ocbc-digital.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ocbc_digital@2x.png",
"filename" : "ocbc-digital@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ocbc_digital@3x.png",
"filename" : "ocbc-digital@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 13 additions & 35 deletions OmiseSDKTests/CapabilityOperationFixtureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import XCTest

class CapabilityOperationFixtureTests: XCTestCase {

// swiftlint:disable:next function_body_length
func testCapabilityRetrieve() {
let decoder = Client.makeJSONDecoder(for: Request<Source>?.none)

Expand All @@ -30,30 +29,6 @@ class CapabilityOperationFixtureTests: XCTestCase {
XCTFail("Capability doesn't have the BAY Installment backend")
}

if let trueMoneyBackend = capability[OMSSourceTypeValue.trueMoney] {
XCTAssertEqual(trueMoneyBackend.supportedCurrencies, [.thb])
} else {
XCTFail("Capability doesn't have the TrueMoney backend")
}

if let citiPointsBackend = capability[OMSSourceTypeValue.pointsCiti] {
XCTAssertEqual(citiPointsBackend.supportedCurrencies, [.thb])
} else {
XCTFail("Capability doesn't have the Citi Points backend")
}

if let rabbitLinePayBackend = capability[OMSSourceTypeValue.rabbitLinepay] {
XCTAssertEqual(rabbitLinePayBackend.supportedCurrencies, [.thb])
} else {
XCTFail("Capability doesn't have the Rabbit LINE Pay backend")
}

if let ocbcPaoBackend = capability[OMSSourceTypeValue.mobileBankingOCBCPAO] {
XCTAssertEqual(ocbcPaoBackend.supportedCurrencies, [.sgd])
} else {
XCTFail("Capability doesn't have the OCBC Pay Anyone backend")
}

if let fpxBackend = capability[OMSSourceTypeValue.fpx] {
XCTAssertEqual(fpxBackend.banks, [
Capability.Backend.Bank(name: "UOB", code: "uob", isActive: true)
Expand All @@ -70,17 +45,20 @@ class CapabilityOperationFixtureTests: XCTestCase {
XCTFail("Capability doesn't have the Mobile Banking KBank backend")
}

if let grabPayBackend = capability[OMSSourceTypeValue.grabPay] {
XCTAssertEqual(grabPayBackend.supportedCurrencies, [.sgd, .myr])
} else {
XCTFail("Capability doesn't have the GrabPay backend")
}

if let payPayBackend = capability[OMSSourceTypeValue.payPay] {
XCTAssertEqual(payPayBackend.supportedCurrencies, [.jpy])
} else {
XCTFail("Capability doesn't have the PayPay backend")
func testCapabilitySupportsCurrency(_ capability: Capability, sourceType: OMSSourceTypeValue, currencies: Set<Currency>) {
if let backend = capability[sourceType] {
XCTAssertEqual(backend.supportedCurrencies, currencies)
} else {
XCTFail("Capability doesn't have the \(sourceType) backend")
}
}

testCapabilitySupportsCurrency(capability, sourceType: .trueMoney, currencies: [.thb])
testCapabilitySupportsCurrency(capability, sourceType: .pointsCiti, currencies: [.thb])
testCapabilitySupportsCurrency(capability, sourceType: .rabbitLinepay, currencies: [.thb])
testCapabilitySupportsCurrency(capability, sourceType: .mobileBankingOCBCPAO, currencies: [.sgd])
testCapabilitySupportsCurrency(capability, sourceType: .grabPay, currencies: [.sgd, .myr])
testCapabilitySupportsCurrency(capability, sourceType: .payPay, currencies: [.jpy])
} catch {
XCTFail("Cannot decode the source \(error)")
}
Expand Down
Loading