Last active
March 6, 2018 09:20
-
-
Save Michaelvilleneuve/7b7a0b62924faef076a6a668b05eb5a7 to your computer and use it in GitHub Desktop.
Updating fidme infos
This file contains hidden or 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
@ReactMethod | |
public void updateInfo(ReadableMap map, Promise promise) { | |
AccountFC accountFC = FidmeCoupons.with(getActivity()).getAccountFC(); | |
accountFC.setFirstName(map.getString("firstName")); | |
accountFC.setLastName(map.getString("lastName")); | |
FidmeCoupons.with(getActivity()).updateAccountFCInfo(accountFC, new UpdateAccountFCListener() { | |
@Override | |
public void onUpdateAccountFCSucceed() { | |
promise.resolve(); | |
} | |
@Override | |
public void onUpdateAccountFCFailed(FidmeException e) { | |
promise.reject(); | |
Log.d("Log", e.getMessage()); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment