code: def from_array(array):
          
          if array is None or not array:
              return None
          # end if
          assert_type_or_raise(array, dict, parameter_name="array")
  
          data = {}
          data['currency'] = u(array.get('currency'))
          data['total_amount'] = int(array.get('total_amount'))
          data['invoice_payload'] = u(array.get('invoice_payload'))
          data['telegram_payment_charge_id'] = u(array.get('telegram_payment_charge_id'))
          data['provider_payment_charge_id'] = u(array.get('provider_payment_charge_id'))
          data['shipping_option_id'] = u(array.get('shipping_option_id')) if array.get('shipping_option_id') is not None else None
          data['order_info'] = OrderInfo.from_array(array.get('order_info')) if array.get('order_info') is not None else None
          data['_raw'] = array
          return SuccessfulPayment(**data)
docs: Deserialize a new SuccessfulPayment from a given dictionary.
  
          :return: new SuccessfulPayment instance.
          :rtype: SuccessfulPayment