Skip to content

Instantly share code, notes, and snippets.

@Michaelvilleneuve
Last active March 6, 2018 09:20
Show Gist options
  • Save Michaelvilleneuve/7b7a0b62924faef076a6a668b05eb5a7 to your computer and use it in GitHub Desktop.
Save Michaelvilleneuve/7b7a0b62924faef076a6a668b05eb5a7 to your computer and use it in GitHub Desktop.
Updating fidme infos
@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