Gets a transactions fee details if applicable.

 @see https://reference.promisepay.com/#shows-transaction-fees

 @return [Promisepay::Fee]
332085
def fee
      response = JSON.parse(@client.get("transactions/#{send(:id)}/fees").body)
      response.key?('fees') ? Promisepay::Fee.new(@client, response['fees']) : nil
    end
205419
def get_transaction_type_from_symbol(transaction_type)
      begin
        target_type = transaction_type.to_s.upcase
        return if target_type.empty?
        self.class.const_get(target_type)
      rescue NameError => error
        raise Bitpagos::Errors::InvalidTransactionType.new(error.message)
      end
    end
1354894
public function getTransactionDetail($transaction_id){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_WALLET . Endpoints::WALLET_TRANSACTION;
        $url = sprintf($url,$transaction_id);
        $result = $this->authenticationService->getTransport()->fetch($url);

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            // Wrap it in a array since maskData takes an Array of Array
            $maskWrapper = array($result['results']);
            $this->maskData($maskWrapper);
            return $maskWrapper[0];
        }else{
            return 0;
        }
    }
390941
def due(self):
        
        invoice_charges = Charge.objects.filter(invoice=self)
        invoice_transactions = Transaction.successful.filter(invoice=self)
        return total_amount(invoice_charges) - total_amount(invoice_transactions)
855998
public SendRequest getSendRequest() {
        Transaction tx = new Transaction(params);
        for (Protos.Output output : paymentDetails.getOutputsList())
            tx.addOutput(new TransactionOutput(params, tx, Coin.valueOf(output.getAmount()), output.getScript().toByteArray()));
        return SendRequest.forTx(tx).fromPaymentDetails(paymentDetails);
    }
1321113
def perform_request
      @raw_response = Braintree::Transaction.submit_for_settlement(
        @options[:reference_number], @options[:amount]
      )
      Conduit::Driver::Braintree::Json::Transaction.new(@raw_response).to_json
    end
1040983
def transaction(force_sync = false, &block)
      # Ruby 1.9.3 does not support @mutex.owned?
      if @mutex.respond_to?(:owned?)
        force_sync = false if @mutex.locked? && @mutex.owned?
      else
        # If we allowed this in Ruby 1.9.3, it might possibly cause recursive
        # locking within the same thread.
        force_sync = false
      end
      if !force_sync && (@in_transaction || options[:without_mutex])
        block.call self
      else
        @mutex.synchronize do
          @in_transaction = true
          result = block.call
          @in_transaction = false
          result
        end
      end
    end
510950
def transaction_request_object(amount, creditcard, gateway_options)
     {  'AccountHolder' => creditcard.name,
        'ClientIP' => gateway_options[:ip],
        'Details' => transaction_details(amount, creditcard, gateway_options),
        'BillingAddress' => address_hash(creditcard, gateway_options, :billing_address),
        'ShippingAddress' => address_hash(creditcard, gateway_options, :shipping_address),
        'CreditCardData' => {
          'CardNumber' => creditcard.number,
          'CardExpiration' => expiration_date(creditcard),
          'AvsStreet' => gateway_options[:billing_address][:address1],
          'AvsZip' => gateway_options[:billing_address][:zip],
          'CardCode' => creditcard.verification_value } }
    end
192019
private Transaction onBegin()
    {
        Transaction tx;
        if (((StatelessSessionImpl) s).getTransactionCoordinator().isTransactionActive())
        {
            tx = ((StatelessSessionImpl) s).getTransaction();
        }
        else
        {
            tx = s.beginTransaction();
        }
        return tx;
    }
565609
def get(self, tx_id: str) -> Transaction:
        
        query = (
            self.book.session.query(Transaction)
            .filter(Transaction.guid == tx_id)
        )
        return query.one()
358998
function getRawPendingTransactions (queryOptions) {
  return sendQuery(
    queryOptions,
    queryHelper.addQuery(
      queryHelper.emptyQuery(),
      'getPendingTransactions',
      {}
    ),
    (resolve, reject, responseName, response) => {
      if (responseName !== 'TRANSACTIONS_RESPONSE') {
        const error = JSON.stringify(response.toObject().errorResponse)
        return reject(new Error(`Query response error: expected=TRANSACTIONS_RESPONSE, actual=${responseName}\nReason: ${error}`))
      }

      const transactions = response.getTransactionsResponse()
      resolve(transactions)
    }
  )
}
644155
public Coin getFee() {
        Coin fee = Coin.ZERO;
        if (inputs.isEmpty() || outputs.isEmpty()) // Incomplete transaction
            return null;
        for (TransactionInput input : inputs) {
            if (input.getValue() == null)
                return null;
            fee = fee.add(input.getValue());
        }
        for (TransactionOutput output : outputs) {
            fee = fee.subtract(output.getValue());
        }
        return fee;
    }
421814
def get_transactions(self):
        
        self.transactions[:] = NetworkAPI.get_transactions(self.address)
        if self.segwit_address:
            self.transactions += NetworkAPI.get_transactions(self.segwit_address)
        return self.transactions
1044892
def cost_of block
      assumes = block.select{ |s| s.is_a?(AssumeStatement)}
      cost = assumes.inject(0) do |acc, stmt|
        if values = stmt.get_attribute(:'smack.InstTimingCost.Int64')
          acc += values.first.show.to_i
        end
        acc
      end

      return cost
    end
221945
def create(attributes)
      response = JSON.parse(@client.post('fees', attributes).body)
      Promisepay::Fee.new(@client, response['fees'])
    end
175896
def get_shipping_costs(params)
      raise ArgumentError unless params[:ItemID]
      response = get_json_response(build_request_url('GetShippingCosts', params))
      return response
    end
112618
def refund_transaction(options = {})
      @logger.debug("[refund_transaction] options=#{options.inspect}")

      validate_refund_transaction_params!(options)

      response = execute_request(:refund_info, options)
      unless response.refundable?
        raise NonRefundableTransactionException, options[:transaction_id]
      end

      # Pick maximum refundable amount if amount is not supplied.
      options[:amount] = response.maximum_amount unless options[:amount]

      # Fill required parameters with data from refund info request.
      options.merge!(
        payment_method: response.payment_method,
        invoicenumber: response.invoicenumber,
        currency: response.currency
      )

      execute_request(:refund_transaction, options)
    end