wupdigital / finshape-anb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova Money Stories Plugin

MoneyStories SDK is a delightful component for show stories provided by Finshape communication with backend.

The SDK is powered with Finshape industry-proven and world leading the digital banking and personalisation solutions that help you get where you want to be on your digitalisation journey – fast and without detours.

Supported Platforms

  • iOS
  • Android

Installation

  • Run the following command:
    cordova plugin add https://github.com/wupdigital/finshape-anb.git

MoneyStories Plugin

The MoneyStories Plugin Digital banking made fast, easy and personalised.

Methods

  • initializeSdk: Method to initialise the SDK. This function returns a Array of Stories

  • openStories: Method to open your customazed stories with custom parameters.

  • refreshToken: Method to refresh the token to be able to see the stories.

initializeSdk()

Parameters:

  • baseUrl: The base URL should be provided by Finshare.

  • accessToken: Access Token should be provided by Finshape.

  • languageCode: Provide the language that you want to see in your stories.

  • customerId: Provide your customerId.

  • successCallback: A callback that is passed when the service is started with success. (Function)

  • errorCallback: A callback that executes if an error occurs retrieving the MoneyStories Plugin initializeSdk. (Function)

Example - initializeSdk()

var success = function (data) {
    console.log(data);
}

var fail = function (error) {
    console.log(error);
}

cordova.plugins.MoneyStoriesPlugin.initializeSdk(
    {
        baseUrl: "PASTE YOUR BASE URL HERE",
        languageCode: "en",
        accessToken: "PASTE YOUR ACCESS TOKEN HERE",
        customerId: "PASTE YOUR CUSTOMER ID HERE"
    },
    success, 
    fail
);

openStories()

Parameters:

  • jsonObject: The JSON object which contains the fields necessary to open the Story View

  • successCallback: A callback that is passed when the service is started with success. (Function)

  • errorCallback: A callback that executes if an error occurs retrieving the MoneyStories Plugin openStories. (Function)

Example - openStories()

var success = function (data) {
    console.log(data);
}

var fail = function (error) {
    console.log(error);
}

cordova.plugins.MoneyStoriesPlugin.openStories(
    {
        period: "DAILY",
        date: "2022-03-22"
    },
    success, 
    fail
);

refreshToken()

Parameters:

  • accessToken: The access token to refresh

  • successCallback: A callback that is passed when the service is started with success. (Function)

  • errorCallback: A callback that executes if an error occurs retrieving the MoneyStories Plugin refreshToken. (Function)

Example - refreshToken()

var success = function (data) {
    console.log(data);
}

var fail = function (error) {
    console.log(error);
}

cordova.plugins.MoneyStoriesPlugin.refreshToken(
    "token here....",
    success, 
    fail
);
Observations:

    For the openStories action in the period field, the available values are:
    - DAILY
    - WEEKLY
    - MONTHLY

    - Date format should be: YYYY-MM-DD, Example: 2023-01-01

Story View screenshot

Contributors

Document author

###Copyright OutSystems, 2023


LICENSE

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

License:MIT License


Languages

Language:Objective-C 70.1%Language:Java 26.7%Language:HTML 1.8%Language:JavaScript 1.2%Language:CSS 0.1%