All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ning.billing.invoice.dao.InvoicePaymentSqlDao.sql.stg Maven / Gradle / Ivy

group InvoicePayment;

invoicePaymentFields(prefix) ::= <<
  invoice_id,
  payment_attempt_id,
  payment_attempt_date,
  amount,
  currency,
  created_date,
  updated_date
>>

create() ::= <<
  INSERT INTO invoice_payments()
  VALUES(:invoiceId, :paymentAttemptId, :paymentAttemptDate, :amount, :currency, :createdDate, :updatedDate);
>>

batchCreateFromTransaction() ::= <<
  INSERT INTO invoice_payments()
  VALUES(:invoiceId, :paymentAttemptId, :paymentAttemptDate, :amount, :currency, :createdDate, :updatedDate);
>>


update() ::= <<
  UPDATE invoice_payments
  SET payment_date = :paymentAttemptDate, amount = :amount, currency = :currency, created_date = :createdDate, updated_date = :updatedDate
  WHERE invoice_id = :invoiceId, payment_attempt_id = :paymentAttemptId;
>>

getByPaymentAttemptId() ::= <<
  SELECT 
  FROM invoice_payments
  WHERE payment_id = :paymentAttemptId;
>>

get() ::= <<
  SELECT 
  FROM invoice_payments;
>>

getPaymentsForInvoice() ::= <<
  SELECT 
  FROM invoice_payments
  WHERE invoice_id = :invoiceId;
>>

notifyOfPaymentAttempt() ::= <<
  INSERT INTO invoice_payments()
  VALUES(:invoiceId, :paymentAttemptId, :paymentAttemptDate, :amount, :currency, NOW(), NOW());
>>

getInvoicePayment() ::= <<
    SELECT 
    FROM invoice_payments
    WHERE payment_id = :payment_id;
>>

test() ::= <<
  SELECT 1 FROM invoice_payments;
>>
;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy