text: /**
   *  Copyright (c) 2018, MasterCard International Incorporated and/or its
   *  affiliates. All rights reserved.
   *
   *  The contents of this file may only be used subject to the MasterCard
   *  Mobile Payment SDK for MCBP and/or MasterCard Mobile MPP UI SDK
   *  Materials License.
   *
   *  Please refer to the file LICENSE.TXT for full details.
   *
   *  TO THE EXTENT PERMITTED BY LAW, 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
   *  NON INFRINGEMENT. TO THE EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
   *  MASTERCARD OR ITS AFFILIATES 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.
   **/
  
  // AUTOGENERATED FILE - DO NOT MODIFY!
  // This file generated by Djinni from Iso4217CurrencyUtils.djinni
  
  #import <Foundation/Foundation.h>
  @class Currency;
  @class Currency;
  
  
  /** Auto-generated Djinni interface for ::mpsdk::utils::currency::Iso4217CurrencyUtils_t */
  @interface Iso4217CurrencyUtils : NSObject
  
  /**
   * 
   * Get the currency code from a numeric value
   * 
   * @param numericCode The Numeric Code as String
   * @return The Currency_t Code
   * 
   */
  + (NSString* _Nonnull)getCodeFromNumericValue:(NSString* _Nonnull)numericCode;
  
  /**
   * 
   * Utility function to calculate the fraction digits for a given currency. If the currency is
   * null, fraction digits will be returned as 0
   * 
   * @return The fraction digit for this currency. 0, if the currency is null.
   * 
   */
  + (int32_t)getFractionDigits:(Currency* _Nullable)currency;
  
  /**
   * 
   * Utility function to get the Currency_t from the numeric code (e.g. EURO has code 978).
   * 
   * @param code The ISO 4217 Numeric code as byte[]
   * @return The Currency_t associated with that numeric code. Null if the currency could not be
   * found
   * 
   */
  + (Currency* _Nullable)getCurrencyByCode:(int32_t)code;
  
  /**
   * 
   * Utility function to calculate the exact amount for a given currency code.
   * For example, 5199 USD is converted into 55,99 USD as USD has 2 fraction digits
   * 
   * @param amount   The transaction amount as BCD data (as received in the C-APDU)
   * @param currency The currency for the amount
   * @return The amount as double
   * 
   */
  + (double)convertBcdAmountToDouble:(NSData* _Nonnull)amount
                            currency:(Currency* _Nullable)currency;
  
  /**
   * 
   * Utility function to calculate the exact amount for a given currency code.
   * Please note that this function assumes binary data as Input
   * 
   * @param amount   The transaction amount as binary data. This is used for Amount Other in the
   * transaction data
   * @param currency The currency for the amount
   * @return The amount as double
   * 
   */
  + (double)convertBinaryAmountToDouble:(NSData* _Nonnull)amount
                               currency:(Currency* _Nonnull)currency;
  
  /**
   * 
   * Converts an amount, into its double equivalent when taking into account the number of fraction
   * digits for the given currency
   * 
   * @param amount   the amount in the lowest denomination
   * @param currency the currency
   * @return the double representation of the amount
   * 
   */
  + (double)convertAmountToDouble:(int64_t)amount
                         currency:(Currency* _Nonnull)currency;
  
  @end
  