Skip to content

Commit

Permalink
Mob 4371 post release 1 7 0 [MASTER] (#169)
Browse files Browse the repository at this point in the history
* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* MOB-3528: Release 1.5.3 (develop) (#115)

* Release 1.5.3

* test circleci

* undo circleci test

* Add new error codes (#117)

* Add loyalty nonce to booking api (#118)

* Modify LoyaltyProgramme to be an Object vs an Array (#120)

* Mob xxxx circleci fix (#124)

* Update config.yml

* Update config.yml

* Revert

* Avoid deleting the SSH private key

* use separate commends

* use xlarge resource

* use cache for bundle

* update xcode version to 12.2.0

* a bit cleanup

* revert back to working version

* update bundler version

* use large resource

* use xlarge resource

* update xcode version, decrease resource_class to medium to fit our price plan

* revert Xcode to 12.0, revert resource_class to xlarge, and change bundler version to 2.2.7 - working UISDK config

* try solution proposed by Mikolaj

* going back to xcode 12.2 and large resource_class

* using medium resource_class

* update fastlane

* update fastlane take 2

* circleci sanity check

* test removing ssh key

* reverting last commit

* adjust bundler version

* test circleci

* update to xcode 13

* update fastlane

* remove fastline update, run bundle install before installing specific gem

* Use xcode 12.5.1

* Minor change

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Diana Petrea <[email protected]>

* [MOB-3633] Add Loyalty API (#119)

* Add endpoints

* LoyaltyStatus API Added

* Add LoyaltyPoints model

* Fix up the API endpoints

* LoyaltyStatus Interactor

* Edit APIEndpoint again

* Update LoyaltyService

* LoyaltyBurn interactor

* Loyaltyearn Interactor

* Update LoyaltyService

* PreAuth interactor

* Update service

* Add mocks

* Preauth mock

* Add tests

* Add remaining tests

* Update PreAuth interactor

* Remove Integration Tests (Not ready)

* Fix loyaltyservice for preauth

* Fix tests

* Make requested changes to LoyaltyPreAuth

* points to burnPoints

* Guard currency

* Fix broken test

* Add new status test to make sure request is setup correctly

* Fix loyaltyStatus?

* cicleci test commit

* test circleci commit

* Add errors

* Mob 3656 (#123)

* get and persist loyalty status after payment provider response

* minor change

* add get current status method to loyalty service

* refresh current loyalty status

* add unit tests

* Fix for paymemt provider model

* resolve PR comments

Co-authored-by: Mostafa Hadian <[email protected]>

Co-authored-by: Diana Petrea <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dianakarh <[email protected]>

* Mob 3650 (#125)

* update loyalty nonce model

* fix unit test

* fix loyalty preauth interactor

* redo execute implementation in loyalty preauth interactor

* Mob 3785 (#126)

* add slug to KarhooError

* use slug, add new error type

* add new errot type

* bump version (#127)

* MOB-3819 add shopper locale to adyen payment request (#129)

* add shopper locale to adyen payment request

* add minor tweak

* Feature/MOB-3883 add basic analytics events to track the conversion steps (#130)

* New event names added according to requirements in https://karhoo.atlassian.net/browse/MOB-3868

* cleanup

* cleanup

* Renaming

* bump version (#131)

* change vehicle class to vehicle type in quote categories (#134)

* change vehicle class to vehicle type in quote categories
* fix tests

* Feature/4021 add client key endpoint (#137)

* add Adyen client key call

* Mob 4024 post release 1.6 [DEVELOP] (#141)

* [MOB-3216] Update master (#97)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* MOB-3387 Final release 1.5.0 (#102)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* Post release 1 5 1 (#107)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* MOB-3488 Post release 1.5.2 (master) (#111)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* Release 1.5.2

* Update marketting project version

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: dianakarh <[email protected]>

* MOB-3528: Post Release 1.5.3 (master) (#116)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* Release 1.5.3

* test circleci fix

* undo circleci test

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: ancafeurdean09 <[email protected]>

* Mob-3749_post_release_1_5_4 (#128)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* MOB-3528: Release 1.5.3 (develop) (#115)

* Release 1.5.3

* test circleci

* undo circleci test

* Add new error codes (#117)

* Add loyalty nonce to booking api (#118)

* Modify LoyaltyProgramme to be an Object vs an Array (#120)

* Mob xxxx circleci fix (#124)

* Update config.yml

* Update config.yml

* Revert

* Avoid deleting the SSH private key

* use separate commends

* use xlarge resource

* use cache for bundle

* update xcode version to 12.2.0

* a bit cleanup

* revert back to working version

* update bundler version

* use large resource

* use xlarge resource

* update xcode version, decrease resource_class to medium to fit our price plan

* revert Xcode to 12.0, revert resource_class to xlarge, and change bundler version to 2.2.7 - working UISDK config

* try solution proposed by Mikolaj

* going back to xcode 12.2 and large resource_class

* using medium resource_class

* update fastlane

* update fastlane take 2

* circleci sanity check

* test removing ssh key

* reverting last commit

* adjust bundler version

* test circleci

* update to xcode 13

* update fastlane

* remove fastline update, run bundle install before installing specific gem

* Use xcode 12.5.1

* Minor change

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Diana Petrea <[email protected]>

* [MOB-3633] Add Loyalty API (#119)

* Add endpoints

* LoyaltyStatus API Added

* Add LoyaltyPoints model

* Fix up the API endpoints

* LoyaltyStatus Interactor

* Edit APIEndpoint again

* Update LoyaltyService

* LoyaltyBurn interactor

* Loyaltyearn Interactor

* Update LoyaltyService

* PreAuth interactor

* Update service

* Add mocks

* Preauth mock

* Add tests

* Add remaining tests

* Update PreAuth interactor

* Remove Integration Tests (Not ready)

* Fix loyaltyservice for preauth

* Fix tests

* Make requested changes to LoyaltyPreAuth

* points to burnPoints

* Guard currency

* Fix broken test

* Add new status test to make sure request is setup correctly

* Fix loyaltyStatus?

* cicleci test commit

* test circleci commit

* Add errors

* Mob 3656 (#123)

* get and persist loyalty status after payment provider response

* minor change

* add get current status method to loyalty service

* refresh current loyalty status

* add unit tests

* Fix for paymemt provider model

* resolve PR comments

Co-authored-by: Mostafa Hadian <[email protected]>

Co-authored-by: Diana Petrea <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dianakarh <[email protected]>

* Mob 3650 (#125)

* update loyalty nonce model

* fix unit test

* fix loyalty preauth interactor

* redo execute implementation in loyalty preauth interactor

* Mob 3785 (#126)

* add slug to KarhooError

* use slug, add new error type

* add new errot type

* bump version

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: ancafeurdean09 <[email protected]>
Co-authored-by: Anca Feurdean <[email protected]>

* Mob 3893 post release 1 5 5 [MASTER] (#132)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* MOB-3528: Release 1.5.3 (develop) (#115)

* Release 1.5.3

* test circleci

* undo circleci test

* Add new error codes (#117)

* Add loyalty nonce to booking api (#118)

* Modify LoyaltyProgramme to be an Object vs an Array (#120)

* Mob xxxx circleci fix (#124)

* Update config.yml

* Update config.yml

* Revert

* Avoid deleting the SSH private key

* use separate commends

* use xlarge resource

* use cache for bundle

* update xcode version to 12.2.0

* a bit cleanup

* revert back to working version

* update bundler version

* use large resource

* use xlarge resource

* update xcode version, decrease resource_class to medium to fit our price plan

* revert Xcode to 12.0, revert resource_class to xlarge, and change bundler version to 2.2.7 - working UISDK config

* try solution proposed by Mikolaj

* going back to xcode 12.2 and large resource_class

* using medium resource_class

* update fastlane

* update fastlane take 2

* circleci sanity check

* test removing ssh key

* reverting last commit

* adjust bundler version

* test circleci

* update to xcode 13

* update fastlane

* remove fastline update, run bundle install before installing specific gem

* Use xcode 12.5.1

* Minor change

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Diana Petrea <[email protected]>

* [MOB-3633] Add Loyalty API (#119)

* Add endpoints

* LoyaltyStatus API Added

* Add LoyaltyPoints model

* Fix up the API endpoints

* LoyaltyStatus Interactor

* Edit APIEndpoint again

* Update LoyaltyService

* LoyaltyBurn interactor

* Loyaltyearn Interactor

* Update LoyaltyService

* PreAuth interactor

* Update service

* Add mocks

* Preauth mock

* Add tests

* Add remaining tests

* Update PreAuth interactor

* Remove Integration Tests (Not ready)

* Fix loyaltyservice for preauth

* Fix tests

* Make requested changes to LoyaltyPreAuth

* points to burnPoints

* Guard currency

* Fix broken test

* Add new status test to make sure request is setup correctly

* Fix loyaltyStatus?

* cicleci test commit

* test circleci commit

* Add errors

* Mob 3656 (#123)

* get and persist loyalty status after payment provider response

* minor change

* add get current status method to loyalty service

* refresh current loyalty status

* add unit tests

* Fix for paymemt provider model

* resolve PR comments

Co-authored-by: Mostafa Hadian <[email protected]>

Co-authored-by: Diana Petrea <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dianakarh <[email protected]>

* Mob 3650 (#125)

* update loyalty nonce model

* fix unit test

* fix loyalty preauth interactor

* redo execute implementation in loyalty preauth interactor

* Mob 3785 (#126)

* add slug to KarhooError

* use slug, add new error type

* add new errot type

* bump version (#127)

* MOB-3819 add shopper locale to adyen payment request (#129)

* add shopper locale to adyen payment request

* add minor tweak

* Feature/MOB-3883 add basic analytics events to track the conversion steps (#130)

* New event names added according to requirements in https://karhoo.atlassian.net/browse/MOB-3868

* cleanup

* cleanup

* Renaming

* bump version

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: ancafeurdean09 <[email protected]>
Co-authored-by: Anca Feurdean <[email protected]>
Co-authored-by: Aleksander Wędrychowski <[email protected]>

* Feature/MOB-4020 update network sdk to support versioning of payment related calls (#136)

* Add `version` parameter to PaymentProvider model

* Payment API Version added to payments interactors and endpints

* force v68 api version for debug

* Payment version added to path if differs from v51

* version path component fix

* version string calculation improved

* Test v68 version

* update tests

* version bump 1.5.5 => 1.5.6

* Change version number

* MOB-4021 cherry pick

* version bump 1.6.0

* version bump in Podspec

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: dianakarh <[email protected]>
Co-authored-by: ancafeurdean09 <[email protected]>
Co-authored-by: Anca Feurdean <[email protected]>
Co-authored-by: Aleksander Wędrychowski <[email protected]>
Co-authored-by: Aleksander Wędrychowski <[email protected]>

* MOB-4020 post release 1.6.1 [develop] (#144)

* [MOB-3216] Update master (#97)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* MOB-3387 Final release 1.5.0 (#102)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* Post release 1 5 1 (#107)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>

* MOB-3488 Post release 1.5.2 (master) (#111)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* Release 1.5.2

* Update marketting project version

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: dianakarh <[email protected]>

* MOB-3528: Post Release 1.5.3 (master) (#116)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* Release 1.5.3

* test circleci fix

* undo circleci test

Co-authored-by: EdwardW2 <[email protected]>
Co-authored-by: Jo Santa Maria <[email protected]>
Co-authored-by: Mostafa Hadian <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: cornelkar <[email protected]>
Co-authored-by: cosminBadulescu <[email protected]>
Co-authored-by: ancafeurdean09 <[email protected]>

* Mob-3749_post_release_1_5_4 (#128)

* [MOB-2976] Quote model update for Polling (#80)

* Update quote models

* Update tests

* Update cart file (#81)

* Call follow endpoint for guest checkout booking fee retrieval (#83)

* [MOB-3176] Cancellation SLA to booking (#84)

* New models

* Update tripinfo object

* Update JSON

* Remove package.resolved file

* Update tests

* Ignore this (#85)

* {MOB-3181] Quotes cancellation SLA (#86)

* Update quote model

* Update tests

* MOB-3144 - Add decimal formatting to CancellationFeePrice (#87)

* Add decimal formatting to CancellationFeePrice

* Update to use global const

* Remove URL suffix (#88)

* Add BrowserInfo to Adyen DropIn Payload (#89)

* Bump nokogiri from 1.10.7 to 1.11.1 (#76)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.11.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* MOB-3205 Add SupplyPartnerID to the AdyenPayments request (#90)

* Add SupplyPartnerId field to the payments API

* Update tests and add supplyPartnerId

* Add Fleet model to be used in Quote model (#91)

* Make service cancellation type an enum (#92)

* Make service cancellation type an enum

* Retain other service cancellation type values.

* Bump kramdown from 2.3.0 to 2.3.1 (#93)

Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/gettalong/kramdown/releases)
- [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page)
- [Commits](https://github.com/gettalong/kramdown/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use the Keychain to store user credentials. (#94)

* Add fastlane update command (#95)

* Add fastlane update command

* Add fastlane update as a separate command

* Update Gemfile.lock

* [MOB-3216] Release 1.4.0 (#96)

* Bump version

* Update pod spec (Need this to be published)

* Bump nokogiri from 1.11.2 to 1.11.5 (#98)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.2 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.2...v1.11.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use date data type for dateBooked (#99)

* Bump version number to 1.5.0 (#100)

* [MOB-3438] login with credentials (#104)

* Make first small changes to auth service.

* Create auth credentials swift files and update authservice

* Init auth credentials interactor

* Credentials finally works as public

* Almost finished

* Swap credentials with authToken

* Finish interactor + rename token interactor

* Remove requestsender

* Test pass

* Release 1.5.1 (#106)

* versiob bump to 1_5_1-rc1

* updated version to 1_5_1

* changed readme (#108)

* MOB-3445 change AuthToken init access level from internal to public (#109)

* MOB-3488 Release 1.5.2 (develop) (#110)

* Release 1.5.2

* Update marketting project version

* MOB-3405 fix coding key for fleet capabilties (#112)

Co-authored-by: Anca Feurdean <[email protected]>

* fix refresh token call headers (#114)

* MOB-3528: Release 1.5.3 (develop) (#115)

* Release 1.5.3

* test circleci

* undo circleci test

* Add new error codes (#117)

* Add loyalty nonce to booking api (#118)

* Modify LoyaltyProgramme to be an Object vs an Array (#120)

* Mob xxxx circleci fix (#124)

* Update config.yml

* Update config.yml

* Revert

* Avoid deleting the SSH private key

* use separate commends

* use xlarge resource

* use cache for bundle

* update xcode version to 12.2.0

* a bit cleanup

* revert back to working version

* update bundler version

* use large resource

* use xlarge resource

* update xcode version, decrease r…
  • Loading branch information
13 people authored Oct 20, 2022
1 parent f7f6c65 commit d2db636
Show file tree
Hide file tree
Showing 28 changed files with 601 additions and 243 deletions.
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
build-and-test:
macos:
xcode: 12.5.1
xcode: 14.0
working_directory: /Users/distiller/project/KarhooSDK.xcodeproj
environment:
FL_OUTPUT_DIR: output
Expand All @@ -18,9 +18,7 @@ jobs:
- run:
name: Set Ruby Version
command: |
echo 'chruby ruby-2.7.2' >> ~/.bash_profile
bundle install
gem install bundler:2.2.15
sudo gem install bundler
- restore_cache:
name: Restore cache - Load installed gems from cache if possible -
keys:
Expand Down Expand Up @@ -52,7 +50,10 @@ jobs:
echo "func environment() -> KarhooEnvironment {" >> Client/Keys.swift
echo "return .custom(environment: .init(host: \"$ADYEN_STG_HOST\", authHost: \"$ADYEN_STG_AUTHHOST\", guestHost: \"$ADYEN_STG_GUESTHOST\")) }" >> Client/Keys.swift
echo "func authenticationMethod() -> AuthenticationMethod {" >> Client/Keys.swift
echo "return .karhooUser }}" >> Client/Keys.swift
echo "return .karhooUser }" >> Client/Keys.swift
echo "func requireSDKAuthentication(callback: @escaping () -> Void) {" >> Client/Keys.swift
echo "callback() }" >> Client/Keys.swift
echo "}" >> Client/Keys.swift
- run:
name: fastlane
command: |
Expand All @@ -67,7 +68,7 @@ jobs:

adhoc:
macos:
xcode: 12.5.1
xcode: 13.4.1
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: adhoc
Expand Down
3 changes: 3 additions & 0 deletions Client/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

struct SDKConfig: KarhooSDKConfiguration {
func requireSDKAuthentication(callback: @escaping () -> Void) {
callback()
}

func environment() -> KarhooEnvironment {
return .sandbox
Expand Down
1 change: 0 additions & 1 deletion Client/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?

@available(iOS 13.0, *)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.8.1)
git (1.11.0)
rchardet (~> 1.8)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
Expand Down Expand Up @@ -226,7 +226,7 @@ GEM
httpclient (2.8.3)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
jmespath (1.6.1)
json (2.5.1)
jwt (2.2.2)
kramdown (2.3.1)
Expand Down Expand Up @@ -302,7 +302,7 @@ GEM
tty-cursor (~> 0.7)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
tzinfo (1.2.10)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
Expand Down
4 changes: 2 additions & 2 deletions KarhooSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|

s.name = "KarhooSDK"
s.version = "1.6.3"
s.version = "1.7.0"
s.summary = "Karhoo Network SDK"
s.homepage = "https://developer.karhoo.com/docs/build-apps-using-sdks"
s.license = 'BSD 2-Clause'
s.author = { "Karhoo" => "[email protected]" }

s.source = { :git => "https://github.com/karhoo/karhoo-ios-sdk.git", :tag => s.version }
s.source_files = 'KarhooSDK/**/*.swift'
s.platform = :ios, '10.0'
s.platform = :ios, '13.0'
s.requires_arc = true
s.swift_version = '5.0'

Expand Down
59 changes: 41 additions & 18 deletions KarhooSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"pins" : [
{
"identity" : "keychain-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/evgenyneu/keychain-swift.git",
"state" : {
"revision" : "96fb84f45a96630e7583903bd7e08cf095c7a7ef",
"version" : "19.0.0"
}
},
{
"identity" : "ohhttpstubs",
"kind" : "remoteSourceControl",
"location" : "https://github.com/AliSoftware/OHHTTPStubs",
"state" : {
"revision" : "e92b5a5746ef16add2a1424f1fc19529d9a75cde",
"version" : "9.0.0"
}
},
{
"identity" : "reachability.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ashleymills/Reachability.swift",
"state" : {
"revision" : "98e968e7b6c1318fb61df23e347bc319761e8acb",
"version" : "5.0.0"
}
}
],
"version" : 2
}
39 changes: 32 additions & 7 deletions KarhooSDK/Api/DataStore/User/Credentials.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,46 @@

import Foundation

struct Credentials {
public struct Credentials {
let accessToken: String
let expiryDate: Date?
let refreshToken: String?

init(accessToken: String, expiryDate: Date?, refreshToken: String?) {
let refreshTokenExpiryDate: Date?

init(
accessToken: String,
expiryDate: Date?,
refreshToken: String?,
refreshTokenExpiryDate: Date?
) {
self.accessToken = accessToken
self.expiryDate = expiryDate
self.refreshToken = refreshToken
self.refreshTokenExpiryDate = refreshTokenExpiryDate
}

init(accessToken: String, expiresIn: TimeInterval, refreshToken: String?) {
init(
accessToken: String,
expiresIn: TimeInterval,
refreshToken: String?,
refreshTokenExpiresIn: TimeInterval?
) {
let expiryDate = Date().addingTimeInterval(Double(expiresIn))
self.init(accessToken: accessToken,
expiryDate: expiryDate,
refreshToken: refreshToken)
let refreshTokenExpiryDate = refreshTokenExpiresIn.map { Date().addingTimeInterval(Double($0)) }
self.init(
accessToken: accessToken,
expiryDate: expiryDate,
refreshToken: refreshToken,
refreshTokenExpiryDate: refreshTokenExpiryDate
)
}

func toAuthToken() -> AuthToken {
AuthToken(
accessToken: accessToken,
expiresIn: Int(expiryDate?.timeIntervalSinceNow ?? 0),
refreshToken: refreshToken ?? "",
refreshExpiresIn: Int(refreshTokenExpiryDate?.timeIntervalSinceNow ?? 0)
)
}
}
1 change: 1 addition & 0 deletions KarhooSDK/Api/DataStore/User/CredentialsStoreKeys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ enum CredentialsStoreKeys: String {
case accessToken
case expiryDate
case refreshToken
case refreshTokenExpiryDate
}
18 changes: 17 additions & 1 deletion KarhooSDK/Api/DataStore/User/UserDataStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,17 @@ final class DefaultUserDataStore: UserDataStore {
let expiryTimeInterval = TimeInterval(expiryDateString) {
expiryDate = Date(timeIntervalSince1970: expiryTimeInterval)
}
return Credentials(accessToken: accessToken, expiryDate: expiryDate, refreshToken: refreshToken)
var refreshTokenExpiryDate: Date?
if let refreshTokenExpiryIntervalString = secretStore.readSecret(withKey: CredentialsStoreKeys.refreshTokenExpiryDate.rawValue),
let refreshTokenExpiryTimeInterval = TimeInterval(refreshTokenExpiryIntervalString) {
refreshTokenExpiryDate = Date(timeIntervalSince1970: refreshTokenExpiryTimeInterval)
}
return Credentials(
accessToken: accessToken,
expiryDate: expiryDate,
refreshToken: refreshToken,
refreshTokenExpiryDate: refreshTokenExpiryDate
)
}

func set(credentials: Credentials) {
Expand All @@ -93,6 +103,11 @@ final class DefaultUserDataStore: UserDataStore {
} else {
secretStore.deleteSecret(withKey: CredentialsStoreKeys.refreshToken.rawValue)
}
if let refreshTokenExpiryTimeInterval = credentials.refreshTokenExpiryDate?.timeIntervalSince1970 {
secretStore.saveSecret(String(refreshTokenExpiryTimeInterval), withKey: CredentialsStoreKeys.refreshTokenExpiryDate.rawValue)
} else {
secretStore.deleteSecret(withKey: CredentialsStoreKeys.refreshTokenExpiryDate.rawValue)
}
}

func setCurrentUser(user: UserInfo, credentials: Credentials) {
Expand Down Expand Up @@ -151,6 +166,7 @@ final class DefaultUserDataStore: UserDataStore {
secretStore.deleteSecret(withKey: CredentialsStoreKeys.accessToken.rawValue)
secretStore.deleteSecret(withKey: CredentialsStoreKeys.expiryDate.rawValue)
secretStore.deleteSecret(withKey: CredentialsStoreKeys.refreshToken.rawValue)
secretStore.deleteSecret(withKey: CredentialsStoreKeys.refreshTokenExpiryDate.rawValue)

broadcastChange()
}
Expand Down
17 changes: 10 additions & 7 deletions KarhooSDK/Api/Response/AuthToken.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public struct AuthToken: KarhooCodableModel {

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
self.accessToken = (try? container.decode(String.self, forKey: .accessToken)) ?? ""
self.expiresIn = (try? container.decode(Int.self, forKey: .expiresIn)) ?? 0
self.refreshToken = (try? container.decode(String.self, forKey: .refreshToken)) ?? ""
self.refreshExpiresIn = (try? container.decode(Int.self, forKey: .refreshExpiresIn)) ?? 0
accessToken = (try? container.decode(String.self, forKey: .accessToken)) ?? ""
expiresIn = (try? container.decode(Int.self, forKey: .expiresIn)) ?? 0
refreshToken = (try? container.decode(String.self, forKey: .refreshToken)) ?? ""
refreshExpiresIn = (try? container.decode(Int.self, forKey: .refreshExpiresIn)) ?? 0
}

public func encode(to encoder: Encoder) throws {
Expand All @@ -48,8 +48,11 @@ public struct AuthToken: KarhooCodableModel {
}

func toCredentials(withRefreshToken refreshToken: String? = nil) -> Credentials {
return Credentials(accessToken: accessToken,
expiresIn: TimeInterval(expiresIn),
refreshToken: refreshToken ?? self.refreshToken)
Credentials(
accessToken: accessToken,
expiresIn: TimeInterval(expiresIn),
refreshToken: refreshToken ?? self.refreshToken,
refreshTokenExpiresIn: TimeInterval(refreshExpiresIn)
)
}
}
26 changes: 0 additions & 26 deletions KarhooSDK/Api/Response/RefreshToken.swift

This file was deleted.

4 changes: 3 additions & 1 deletion KarhooSDK/Api/SDKConfiguration/KarhooSDKConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ public protocol KarhooSDKConfiguration {
func authenticationMethod() -> AuthenticationMethod

func analyticsProvider() -> AnalyticsProvider

/// Closure to provide new auth credentials for KarhooSDK usage, when the current one expires and there is no refresh token available. To do it just log in your app into the SDK again.
func requireSDKAuthentication(callback: @escaping () -> Void)
}

public extension KarhooSDKConfiguration {

func analyticsProvider() -> AnalyticsProvider {
return DefaultAnalyticsProvider()
}
Expand Down
Loading

0 comments on commit d2db636

Please sign in to comment.