mirror of
https://github.com/valitydev/newway.git
synced 2024-11-07 01:45:18 +00:00
Actualized implementation
This commit is contained in:
parent
cbd6644323
commit
e325f9b1a3
2
pom.xml
2
pom.xml
@ -29,7 +29,7 @@
|
||||
<db.password>postgres</db.password>
|
||||
<db.schema>nw</db.schema>
|
||||
<flyway.version>4.2.0</flyway.version>
|
||||
<damsel.version>1.251-15f037a-epic</damsel.version>
|
||||
<damsel.version>1.267-a95c2b3-epic</damsel.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -28,7 +28,9 @@ public enum PayerType implements EnumType {
|
||||
|
||||
payment_resource("payment_resource"),
|
||||
|
||||
customer("customer");
|
||||
customer("customer"),
|
||||
|
||||
recurrent("recurrent");
|
||||
|
||||
private final String literal;
|
||||
|
||||
|
@ -10,7 +10,6 @@ import com.rbkmoney.newway.domain.enums.PayerType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentFlowType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentStatus;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentToolType;
|
||||
import com.rbkmoney.newway.domain.enums.RecurrentTokenSource;
|
||||
import com.rbkmoney.newway.domain.enums.RiskScore;
|
||||
import com.rbkmoney.newway.domain.tables.records.PaymentRecord;
|
||||
|
||||
@ -42,7 +41,7 @@ import org.jooq.impl.TableImpl;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Payment extends TableImpl<PaymentRecord> {
|
||||
|
||||
private static final long serialVersionUID = -1409619571;
|
||||
private static final long serialVersionUID = 490772039;
|
||||
|
||||
/**
|
||||
* The reference instance of <code>nw.payment</code>
|
||||
@ -273,24 +272,19 @@ public class Payment extends TableImpl<PaymentRecord> {
|
||||
public final TableField<PaymentRecord, Boolean> CURRENT = createField("current", org.jooq.impl.SQLDataType.BOOLEAN.nullable(false).defaultValue(org.jooq.impl.DSL.field("true", org.jooq.impl.SQLDataType.BOOLEAN)), this, "");
|
||||
|
||||
/**
|
||||
* The column <code>nw.payment.is_recurring</code>.
|
||||
* The column <code>nw.payment.make_recurrent</code>.
|
||||
*/
|
||||
public final TableField<PaymentRecord, Boolean> IS_RECURRING = createField("is_recurring", org.jooq.impl.SQLDataType.BOOLEAN, this, "");
|
||||
public final TableField<PaymentRecord, Boolean> MAKE_RECURRENT = createField("make_recurrent", org.jooq.impl.SQLDataType.BOOLEAN, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>nw.payment.recurrent_intention_token_source</code>.
|
||||
* The column <code>nw.payment.payer_recurrent_parent_invoice_id</code>.
|
||||
*/
|
||||
public final TableField<PaymentRecord, RecurrentTokenSource> RECURRENT_INTENTION_TOKEN_SOURCE = createField("recurrent_intention_token_source", org.jooq.util.postgres.PostgresDataType.VARCHAR.asEnumDataType(com.rbkmoney.newway.domain.enums.RecurrentTokenSource.class), this, "");
|
||||
public final TableField<PaymentRecord, String> PAYER_RECURRENT_PARENT_INVOICE_ID = createField("payer_recurrent_parent_invoice_id", org.jooq.impl.SQLDataType.VARCHAR, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>nw.payment.recurrent_intention_token_source_invoice_id</code>.
|
||||
* The column <code>nw.payment.payer_recurrent_parent_payment_id</code>.
|
||||
*/
|
||||
public final TableField<PaymentRecord, String> RECURRENT_INTENTION_TOKEN_SOURCE_INVOICE_ID = createField("recurrent_intention_token_source_invoice_id", org.jooq.impl.SQLDataType.VARCHAR, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>nw.payment.recurrent_intention_token_source_payment_id</code>.
|
||||
*/
|
||||
public final TableField<PaymentRecord, String> RECURRENT_INTENTION_TOKEN_SOURCE_PAYMENT_ID = createField("recurrent_intention_token_source_payment_id", org.jooq.impl.SQLDataType.VARCHAR, this, "");
|
||||
public final TableField<PaymentRecord, String> PAYER_RECURRENT_PARENT_PAYMENT_ID = createField("payer_recurrent_parent_payment_id", org.jooq.impl.SQLDataType.VARCHAR, this, "");
|
||||
|
||||
/**
|
||||
* The column <code>nw.payment.recurrent_intention_token</code>.
|
||||
|
@ -8,7 +8,6 @@ import com.rbkmoney.newway.domain.enums.PayerType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentFlowType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentStatus;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentToolType;
|
||||
import com.rbkmoney.newway.domain.enums.RecurrentTokenSource;
|
||||
import com.rbkmoney.newway.domain.enums.RiskScore;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -31,56 +30,55 @@ import javax.annotation.Generated;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class Payment implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1906566481;
|
||||
private static final long serialVersionUID = -845003393;
|
||||
|
||||
private Long id;
|
||||
private Long eventId;
|
||||
private LocalDateTime eventCreatedAt;
|
||||
private String paymentId;
|
||||
private LocalDateTime createdAt;
|
||||
private String invoiceId;
|
||||
private String partyId;
|
||||
private String shopId;
|
||||
private Long domainRevision;
|
||||
private Long partyRevision;
|
||||
private PaymentStatus status;
|
||||
private String statusCancelledReason;
|
||||
private String statusCapturedReason;
|
||||
private String statusFailedFailure;
|
||||
private Long amount;
|
||||
private String currencyCode;
|
||||
private PayerType payerType;
|
||||
private PaymentToolType payerPaymentToolType;
|
||||
private String payerBankCardToken;
|
||||
private String payerBankCardPaymentSystem;
|
||||
private String payerBankCardBin;
|
||||
private String payerBankCardMaskedPan;
|
||||
private String payerBankCardTokenProvider;
|
||||
private String payerPaymentTerminalType;
|
||||
private String payerDigitalWalletProvider;
|
||||
private String payerDigitalWalletId;
|
||||
private String payerPaymentSessionId;
|
||||
private String payerIpAddress;
|
||||
private String payerFingerprint;
|
||||
private String payerPhoneNumber;
|
||||
private String payerEmail;
|
||||
private String payerCustomerId;
|
||||
private String payerCustomerBindingId;
|
||||
private String payerCustomerRecPaymentToolId;
|
||||
private byte[] context;
|
||||
private PaymentFlowType paymentFlowType;
|
||||
private String paymentFlowOnHoldExpiration;
|
||||
private LocalDateTime paymentFlowHeldUntil;
|
||||
private RiskScore riskScore;
|
||||
private Integer routeProviderId;
|
||||
private Integer routeTerminalId;
|
||||
private LocalDateTime wtime;
|
||||
private Boolean current;
|
||||
private Boolean isRecurring;
|
||||
private RecurrentTokenSource recurrentIntentionTokenSource;
|
||||
private String recurrentIntentionTokenSourceInvoiceId;
|
||||
private String recurrentIntentionTokenSourcePaymentId;
|
||||
private String recurrentIntentionToken;
|
||||
private Long id;
|
||||
private Long eventId;
|
||||
private LocalDateTime eventCreatedAt;
|
||||
private String paymentId;
|
||||
private LocalDateTime createdAt;
|
||||
private String invoiceId;
|
||||
private String partyId;
|
||||
private String shopId;
|
||||
private Long domainRevision;
|
||||
private Long partyRevision;
|
||||
private PaymentStatus status;
|
||||
private String statusCancelledReason;
|
||||
private String statusCapturedReason;
|
||||
private String statusFailedFailure;
|
||||
private Long amount;
|
||||
private String currencyCode;
|
||||
private PayerType payerType;
|
||||
private PaymentToolType payerPaymentToolType;
|
||||
private String payerBankCardToken;
|
||||
private String payerBankCardPaymentSystem;
|
||||
private String payerBankCardBin;
|
||||
private String payerBankCardMaskedPan;
|
||||
private String payerBankCardTokenProvider;
|
||||
private String payerPaymentTerminalType;
|
||||
private String payerDigitalWalletProvider;
|
||||
private String payerDigitalWalletId;
|
||||
private String payerPaymentSessionId;
|
||||
private String payerIpAddress;
|
||||
private String payerFingerprint;
|
||||
private String payerPhoneNumber;
|
||||
private String payerEmail;
|
||||
private String payerCustomerId;
|
||||
private String payerCustomerBindingId;
|
||||
private String payerCustomerRecPaymentToolId;
|
||||
private byte[] context;
|
||||
private PaymentFlowType paymentFlowType;
|
||||
private String paymentFlowOnHoldExpiration;
|
||||
private LocalDateTime paymentFlowHeldUntil;
|
||||
private RiskScore riskScore;
|
||||
private Integer routeProviderId;
|
||||
private Integer routeTerminalId;
|
||||
private LocalDateTime wtime;
|
||||
private Boolean current;
|
||||
private Boolean makeRecurrent;
|
||||
private String payerRecurrentParentInvoiceId;
|
||||
private String payerRecurrentParentPaymentId;
|
||||
private String recurrentIntentionToken;
|
||||
|
||||
public Payment() {}
|
||||
|
||||
@ -128,62 +126,60 @@ public class Payment implements Serializable {
|
||||
this.routeTerminalId = value.routeTerminalId;
|
||||
this.wtime = value.wtime;
|
||||
this.current = value.current;
|
||||
this.isRecurring = value.isRecurring;
|
||||
this.recurrentIntentionTokenSource = value.recurrentIntentionTokenSource;
|
||||
this.recurrentIntentionTokenSourceInvoiceId = value.recurrentIntentionTokenSourceInvoiceId;
|
||||
this.recurrentIntentionTokenSourcePaymentId = value.recurrentIntentionTokenSourcePaymentId;
|
||||
this.makeRecurrent = value.makeRecurrent;
|
||||
this.payerRecurrentParentInvoiceId = value.payerRecurrentParentInvoiceId;
|
||||
this.payerRecurrentParentPaymentId = value.payerRecurrentParentPaymentId;
|
||||
this.recurrentIntentionToken = value.recurrentIntentionToken;
|
||||
}
|
||||
|
||||
public Payment(
|
||||
Long id,
|
||||
Long eventId,
|
||||
LocalDateTime eventCreatedAt,
|
||||
String paymentId,
|
||||
LocalDateTime createdAt,
|
||||
String invoiceId,
|
||||
String partyId,
|
||||
String shopId,
|
||||
Long domainRevision,
|
||||
Long partyRevision,
|
||||
PaymentStatus status,
|
||||
String statusCancelledReason,
|
||||
String statusCapturedReason,
|
||||
String statusFailedFailure,
|
||||
Long amount,
|
||||
String currencyCode,
|
||||
PayerType payerType,
|
||||
PaymentToolType payerPaymentToolType,
|
||||
String payerBankCardToken,
|
||||
String payerBankCardPaymentSystem,
|
||||
String payerBankCardBin,
|
||||
String payerBankCardMaskedPan,
|
||||
String payerBankCardTokenProvider,
|
||||
String payerPaymentTerminalType,
|
||||
String payerDigitalWalletProvider,
|
||||
String payerDigitalWalletId,
|
||||
String payerPaymentSessionId,
|
||||
String payerIpAddress,
|
||||
String payerFingerprint,
|
||||
String payerPhoneNumber,
|
||||
String payerEmail,
|
||||
String payerCustomerId,
|
||||
String payerCustomerBindingId,
|
||||
String payerCustomerRecPaymentToolId,
|
||||
byte[] context,
|
||||
PaymentFlowType paymentFlowType,
|
||||
String paymentFlowOnHoldExpiration,
|
||||
LocalDateTime paymentFlowHeldUntil,
|
||||
RiskScore riskScore,
|
||||
Integer routeProviderId,
|
||||
Integer routeTerminalId,
|
||||
LocalDateTime wtime,
|
||||
Boolean current,
|
||||
Boolean isRecurring,
|
||||
RecurrentTokenSource recurrentIntentionTokenSource,
|
||||
String recurrentIntentionTokenSourceInvoiceId,
|
||||
String recurrentIntentionTokenSourcePaymentId,
|
||||
String recurrentIntentionToken
|
||||
Long id,
|
||||
Long eventId,
|
||||
LocalDateTime eventCreatedAt,
|
||||
String paymentId,
|
||||
LocalDateTime createdAt,
|
||||
String invoiceId,
|
||||
String partyId,
|
||||
String shopId,
|
||||
Long domainRevision,
|
||||
Long partyRevision,
|
||||
PaymentStatus status,
|
||||
String statusCancelledReason,
|
||||
String statusCapturedReason,
|
||||
String statusFailedFailure,
|
||||
Long amount,
|
||||
String currencyCode,
|
||||
PayerType payerType,
|
||||
PaymentToolType payerPaymentToolType,
|
||||
String payerBankCardToken,
|
||||
String payerBankCardPaymentSystem,
|
||||
String payerBankCardBin,
|
||||
String payerBankCardMaskedPan,
|
||||
String payerBankCardTokenProvider,
|
||||
String payerPaymentTerminalType,
|
||||
String payerDigitalWalletProvider,
|
||||
String payerDigitalWalletId,
|
||||
String payerPaymentSessionId,
|
||||
String payerIpAddress,
|
||||
String payerFingerprint,
|
||||
String payerPhoneNumber,
|
||||
String payerEmail,
|
||||
String payerCustomerId,
|
||||
String payerCustomerBindingId,
|
||||
String payerCustomerRecPaymentToolId,
|
||||
byte[] context,
|
||||
PaymentFlowType paymentFlowType,
|
||||
String paymentFlowOnHoldExpiration,
|
||||
LocalDateTime paymentFlowHeldUntil,
|
||||
RiskScore riskScore,
|
||||
Integer routeProviderId,
|
||||
Integer routeTerminalId,
|
||||
LocalDateTime wtime,
|
||||
Boolean current,
|
||||
Boolean makeRecurrent,
|
||||
String payerRecurrentParentInvoiceId,
|
||||
String payerRecurrentParentPaymentId,
|
||||
String recurrentIntentionToken
|
||||
) {
|
||||
this.id = id;
|
||||
this.eventId = eventId;
|
||||
@ -228,10 +224,9 @@ public class Payment implements Serializable {
|
||||
this.routeTerminalId = routeTerminalId;
|
||||
this.wtime = wtime;
|
||||
this.current = current;
|
||||
this.isRecurring = isRecurring;
|
||||
this.recurrentIntentionTokenSource = recurrentIntentionTokenSource;
|
||||
this.recurrentIntentionTokenSourceInvoiceId = recurrentIntentionTokenSourceInvoiceId;
|
||||
this.recurrentIntentionTokenSourcePaymentId = recurrentIntentionTokenSourcePaymentId;
|
||||
this.makeRecurrent = makeRecurrent;
|
||||
this.payerRecurrentParentInvoiceId = payerRecurrentParentInvoiceId;
|
||||
this.payerRecurrentParentPaymentId = payerRecurrentParentPaymentId;
|
||||
this.recurrentIntentionToken = recurrentIntentionToken;
|
||||
}
|
||||
|
||||
@ -579,36 +574,28 @@ public class Payment implements Serializable {
|
||||
this.current = current;
|
||||
}
|
||||
|
||||
public Boolean getIsRecurring() {
|
||||
return this.isRecurring;
|
||||
public Boolean getMakeRecurrent() {
|
||||
return this.makeRecurrent;
|
||||
}
|
||||
|
||||
public void setIsRecurring(Boolean isRecurring) {
|
||||
this.isRecurring = isRecurring;
|
||||
public void setMakeRecurrent(Boolean makeRecurrent) {
|
||||
this.makeRecurrent = makeRecurrent;
|
||||
}
|
||||
|
||||
public RecurrentTokenSource getRecurrentIntentionTokenSource() {
|
||||
return this.recurrentIntentionTokenSource;
|
||||
public String getPayerRecurrentParentInvoiceId() {
|
||||
return this.payerRecurrentParentInvoiceId;
|
||||
}
|
||||
|
||||
public void setRecurrentIntentionTokenSource(RecurrentTokenSource recurrentIntentionTokenSource) {
|
||||
this.recurrentIntentionTokenSource = recurrentIntentionTokenSource;
|
||||
public void setPayerRecurrentParentInvoiceId(String payerRecurrentParentInvoiceId) {
|
||||
this.payerRecurrentParentInvoiceId = payerRecurrentParentInvoiceId;
|
||||
}
|
||||
|
||||
public String getRecurrentIntentionTokenSourceInvoiceId() {
|
||||
return this.recurrentIntentionTokenSourceInvoiceId;
|
||||
public String getPayerRecurrentParentPaymentId() {
|
||||
return this.payerRecurrentParentPaymentId;
|
||||
}
|
||||
|
||||
public void setRecurrentIntentionTokenSourceInvoiceId(String recurrentIntentionTokenSourceInvoiceId) {
|
||||
this.recurrentIntentionTokenSourceInvoiceId = recurrentIntentionTokenSourceInvoiceId;
|
||||
}
|
||||
|
||||
public String getRecurrentIntentionTokenSourcePaymentId() {
|
||||
return this.recurrentIntentionTokenSourcePaymentId;
|
||||
}
|
||||
|
||||
public void setRecurrentIntentionTokenSourcePaymentId(String recurrentIntentionTokenSourcePaymentId) {
|
||||
this.recurrentIntentionTokenSourcePaymentId = recurrentIntentionTokenSourcePaymentId;
|
||||
public void setPayerRecurrentParentPaymentId(String payerRecurrentParentPaymentId) {
|
||||
this.payerRecurrentParentPaymentId = payerRecurrentParentPaymentId;
|
||||
}
|
||||
|
||||
public String getRecurrentIntentionToken() {
|
||||
@ -886,29 +873,23 @@ public class Payment implements Serializable {
|
||||
}
|
||||
else if (!current.equals(other.current))
|
||||
return false;
|
||||
if (isRecurring == null) {
|
||||
if (other.isRecurring != null)
|
||||
if (makeRecurrent == null) {
|
||||
if (other.makeRecurrent != null)
|
||||
return false;
|
||||
}
|
||||
else if (!isRecurring.equals(other.isRecurring))
|
||||
else if (!makeRecurrent.equals(other.makeRecurrent))
|
||||
return false;
|
||||
if (recurrentIntentionTokenSource == null) {
|
||||
if (other.recurrentIntentionTokenSource != null)
|
||||
if (payerRecurrentParentInvoiceId == null) {
|
||||
if (other.payerRecurrentParentInvoiceId != null)
|
||||
return false;
|
||||
}
|
||||
else if (!recurrentIntentionTokenSource.equals(other.recurrentIntentionTokenSource))
|
||||
else if (!payerRecurrentParentInvoiceId.equals(other.payerRecurrentParentInvoiceId))
|
||||
return false;
|
||||
if (recurrentIntentionTokenSourceInvoiceId == null) {
|
||||
if (other.recurrentIntentionTokenSourceInvoiceId != null)
|
||||
if (payerRecurrentParentPaymentId == null) {
|
||||
if (other.payerRecurrentParentPaymentId != null)
|
||||
return false;
|
||||
}
|
||||
else if (!recurrentIntentionTokenSourceInvoiceId.equals(other.recurrentIntentionTokenSourceInvoiceId))
|
||||
return false;
|
||||
if (recurrentIntentionTokenSourcePaymentId == null) {
|
||||
if (other.recurrentIntentionTokenSourcePaymentId != null)
|
||||
return false;
|
||||
}
|
||||
else if (!recurrentIntentionTokenSourcePaymentId.equals(other.recurrentIntentionTokenSourcePaymentId))
|
||||
else if (!payerRecurrentParentPaymentId.equals(other.payerRecurrentParentPaymentId))
|
||||
return false;
|
||||
if (recurrentIntentionToken == null) {
|
||||
if (other.recurrentIntentionToken != null)
|
||||
@ -966,10 +947,9 @@ public class Payment implements Serializable {
|
||||
result = prime * result + ((this.routeTerminalId == null) ? 0 : this.routeTerminalId.hashCode());
|
||||
result = prime * result + ((this.wtime == null) ? 0 : this.wtime.hashCode());
|
||||
result = prime * result + ((this.current == null) ? 0 : this.current.hashCode());
|
||||
result = prime * result + ((this.isRecurring == null) ? 0 : this.isRecurring.hashCode());
|
||||
result = prime * result + ((this.recurrentIntentionTokenSource == null) ? 0 : this.recurrentIntentionTokenSource.hashCode());
|
||||
result = prime * result + ((this.recurrentIntentionTokenSourceInvoiceId == null) ? 0 : this.recurrentIntentionTokenSourceInvoiceId.hashCode());
|
||||
result = prime * result + ((this.recurrentIntentionTokenSourcePaymentId == null) ? 0 : this.recurrentIntentionTokenSourcePaymentId.hashCode());
|
||||
result = prime * result + ((this.makeRecurrent == null) ? 0 : this.makeRecurrent.hashCode());
|
||||
result = prime * result + ((this.payerRecurrentParentInvoiceId == null) ? 0 : this.payerRecurrentParentInvoiceId.hashCode());
|
||||
result = prime * result + ((this.payerRecurrentParentPaymentId == null) ? 0 : this.payerRecurrentParentPaymentId.hashCode());
|
||||
result = prime * result + ((this.recurrentIntentionToken == null) ? 0 : this.recurrentIntentionToken.hashCode());
|
||||
return result;
|
||||
}
|
||||
@ -1021,10 +1001,9 @@ public class Payment implements Serializable {
|
||||
sb.append(", ").append(routeTerminalId);
|
||||
sb.append(", ").append(wtime);
|
||||
sb.append(", ").append(current);
|
||||
sb.append(", ").append(isRecurring);
|
||||
sb.append(", ").append(recurrentIntentionTokenSource);
|
||||
sb.append(", ").append(recurrentIntentionTokenSourceInvoiceId);
|
||||
sb.append(", ").append(recurrentIntentionTokenSourcePaymentId);
|
||||
sb.append(", ").append(makeRecurrent);
|
||||
sb.append(", ").append(payerRecurrentParentInvoiceId);
|
||||
sb.append(", ").append(payerRecurrentParentPaymentId);
|
||||
sb.append(", ").append(recurrentIntentionToken);
|
||||
|
||||
sb.append(")");
|
||||
|
@ -8,7 +8,6 @@ import com.rbkmoney.newway.domain.enums.PayerType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentFlowType;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentStatus;
|
||||
import com.rbkmoney.newway.domain.enums.PaymentToolType;
|
||||
import com.rbkmoney.newway.domain.enums.RecurrentTokenSource;
|
||||
import com.rbkmoney.newway.domain.enums.RiskScore;
|
||||
import com.rbkmoney.newway.domain.tables.Payment;
|
||||
|
||||
@ -33,7 +32,7 @@ import org.jooq.impl.UpdatableRecordImpl;
|
||||
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
|
||||
public class PaymentRecord extends UpdatableRecordImpl<PaymentRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1043313227;
|
||||
private static final long serialVersionUID = -1095066936;
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.id</code>.
|
||||
@ -638,73 +637,59 @@ public class PaymentRecord extends UpdatableRecordImpl<PaymentRecord> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.is_recurring</code>.
|
||||
* Setter for <code>nw.payment.make_recurrent</code>.
|
||||
*/
|
||||
public void setIsRecurring(Boolean value) {
|
||||
public void setMakeRecurrent(Boolean value) {
|
||||
set(43, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>nw.payment.is_recurring</code>.
|
||||
* Getter for <code>nw.payment.make_recurrent</code>.
|
||||
*/
|
||||
public Boolean getIsRecurring() {
|
||||
public Boolean getMakeRecurrent() {
|
||||
return (Boolean) get(43);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.recurrent_intention_token_source</code>.
|
||||
* Setter for <code>nw.payment.payer_recurrent_parent_invoice_id</code>.
|
||||
*/
|
||||
public void setRecurrentIntentionTokenSource(RecurrentTokenSource value) {
|
||||
public void setPayerRecurrentParentInvoiceId(String value) {
|
||||
set(44, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>nw.payment.recurrent_intention_token_source</code>.
|
||||
* Getter for <code>nw.payment.payer_recurrent_parent_invoice_id</code>.
|
||||
*/
|
||||
public RecurrentTokenSource getRecurrentIntentionTokenSource() {
|
||||
return (RecurrentTokenSource) get(44);
|
||||
public String getPayerRecurrentParentInvoiceId() {
|
||||
return (String) get(44);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.recurrent_intention_token_source_invoice_id</code>.
|
||||
* Setter for <code>nw.payment.payer_recurrent_parent_payment_id</code>.
|
||||
*/
|
||||
public void setRecurrentIntentionTokenSourceInvoiceId(String value) {
|
||||
public void setPayerRecurrentParentPaymentId(String value) {
|
||||
set(45, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>nw.payment.recurrent_intention_token_source_invoice_id</code>.
|
||||
* Getter for <code>nw.payment.payer_recurrent_parent_payment_id</code>.
|
||||
*/
|
||||
public String getRecurrentIntentionTokenSourceInvoiceId() {
|
||||
public String getPayerRecurrentParentPaymentId() {
|
||||
return (String) get(45);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.recurrent_intention_token_source_payment_id</code>.
|
||||
*/
|
||||
public void setRecurrentIntentionTokenSourcePaymentId(String value) {
|
||||
set(46, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>nw.payment.recurrent_intention_token_source_payment_id</code>.
|
||||
*/
|
||||
public String getRecurrentIntentionTokenSourcePaymentId() {
|
||||
return (String) get(46);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for <code>nw.payment.recurrent_intention_token</code>.
|
||||
*/
|
||||
public void setRecurrentIntentionToken(String value) {
|
||||
set(47, value);
|
||||
set(46, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for <code>nw.payment.recurrent_intention_token</code>.
|
||||
*/
|
||||
public String getRecurrentIntentionToken() {
|
||||
return (String) get(47);
|
||||
return (String) get(46);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@ -733,7 +718,7 @@ public class PaymentRecord extends UpdatableRecordImpl<PaymentRecord> {
|
||||
/**
|
||||
* Create a detached, initialised PaymentRecord
|
||||
*/
|
||||
public PaymentRecord(Long id, Long eventId, LocalDateTime eventCreatedAt, String paymentId, LocalDateTime createdAt, String invoiceId, String partyId, String shopId, Long domainRevision, Long partyRevision, PaymentStatus status, String statusCancelledReason, String statusCapturedReason, String statusFailedFailure, Long amount, String currencyCode, PayerType payerType, PaymentToolType payerPaymentToolType, String payerBankCardToken, String payerBankCardPaymentSystem, String payerBankCardBin, String payerBankCardMaskedPan, String payerBankCardTokenProvider, String payerPaymentTerminalType, String payerDigitalWalletProvider, String payerDigitalWalletId, String payerPaymentSessionId, String payerIpAddress, String payerFingerprint, String payerPhoneNumber, String payerEmail, String payerCustomerId, String payerCustomerBindingId, String payerCustomerRecPaymentToolId, byte[] context, PaymentFlowType paymentFlowType, String paymentFlowOnHoldExpiration, LocalDateTime paymentFlowHeldUntil, RiskScore riskScore, Integer routeProviderId, Integer routeTerminalId, LocalDateTime wtime, Boolean current, Boolean isRecurring, RecurrentTokenSource recurrentIntentionTokenSource, String recurrentIntentionTokenSourceInvoiceId, String recurrentIntentionTokenSourcePaymentId, String recurrentIntentionToken) {
|
||||
public PaymentRecord(Long id, Long eventId, LocalDateTime eventCreatedAt, String paymentId, LocalDateTime createdAt, String invoiceId, String partyId, String shopId, Long domainRevision, Long partyRevision, PaymentStatus status, String statusCancelledReason, String statusCapturedReason, String statusFailedFailure, Long amount, String currencyCode, PayerType payerType, PaymentToolType payerPaymentToolType, String payerBankCardToken, String payerBankCardPaymentSystem, String payerBankCardBin, String payerBankCardMaskedPan, String payerBankCardTokenProvider, String payerPaymentTerminalType, String payerDigitalWalletProvider, String payerDigitalWalletId, String payerPaymentSessionId, String payerIpAddress, String payerFingerprint, String payerPhoneNumber, String payerEmail, String payerCustomerId, String payerCustomerBindingId, String payerCustomerRecPaymentToolId, byte[] context, PaymentFlowType paymentFlowType, String paymentFlowOnHoldExpiration, LocalDateTime paymentFlowHeldUntil, RiskScore riskScore, Integer routeProviderId, Integer routeTerminalId, LocalDateTime wtime, Boolean current, Boolean makeRecurrent, String payerRecurrentParentInvoiceId, String payerRecurrentParentPaymentId, String recurrentIntentionToken) {
|
||||
super(Payment.PAYMENT);
|
||||
|
||||
set(0, id);
|
||||
@ -779,10 +764,9 @@ public class PaymentRecord extends UpdatableRecordImpl<PaymentRecord> {
|
||||
set(40, routeTerminalId);
|
||||
set(41, wtime);
|
||||
set(42, current);
|
||||
set(43, isRecurring);
|
||||
set(44, recurrentIntentionTokenSource);
|
||||
set(45, recurrentIntentionTokenSourceInvoiceId);
|
||||
set(46, recurrentIntentionTokenSourcePaymentId);
|
||||
set(47, recurrentIntentionToken);
|
||||
set(43, makeRecurrent);
|
||||
set(44, payerRecurrentParentInvoiceId);
|
||||
set(45, payerRecurrentParentPaymentId);
|
||||
set(46, recurrentIntentionToken);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
package com.rbkmoney.newway.poller.handler.impl.invoicing.payment;
|
||||
|
||||
import com.rbkmoney.damsel.domain.ContactInfo;
|
||||
import com.rbkmoney.damsel.domain.CustomerPayer;
|
||||
import com.rbkmoney.damsel.domain.InvoicePayment;
|
||||
import com.rbkmoney.damsel.domain.PaymentTool;
|
||||
import com.rbkmoney.damsel.domain.*;
|
||||
import com.rbkmoney.damsel.domain.RecurrentTokenSource;
|
||||
import com.rbkmoney.damsel.payment_processing.Event;
|
||||
import com.rbkmoney.damsel.payment_processing.InvoiceChange;
|
||||
@ -100,19 +97,28 @@ public class InvoicePaymentCreatedHandler extends AbstractInvoicingHandler {
|
||||
}
|
||||
payment.setAmount(invoicePayment.getCost().getAmount());
|
||||
payment.setCurrencyCode(invoicePayment.getCost().getCurrency().getSymbolicCode());
|
||||
payment.setPayerType(TBaseUtil.unionFieldToEnum(invoicePayment.getPayer(), PayerType.class));
|
||||
if (invoicePayment.getPayer().isSetPaymentResource()) {
|
||||
PaymentTool paymentTool = invoicePayment.getPayer().getPaymentResource().getResource().getPaymentTool();
|
||||
fillPaymentTool(payment, paymentTool);
|
||||
ContactInfo contactInfo = invoicePayment.getPayer().getPaymentResource().getContactInfo();
|
||||
fillContactInfo(payment, contactInfo);
|
||||
} else if (invoicePayment.getPayer().isSetCustomer()) {
|
||||
CustomerPayer customer = invoicePayment.getPayer().getCustomer();
|
||||
Payer payer = invoicePayment.getPayer();
|
||||
payment.setPayerType(TBaseUtil.unionFieldToEnum(payer, PayerType.class));
|
||||
if (payer.isSetPaymentResource()) {
|
||||
PaymentResourcePayer paymentResource = payer.getPaymentResource();
|
||||
fillPaymentTool(payment, paymentResource.getResource().getPaymentTool());
|
||||
fillContactInfo(payment, paymentResource.getContactInfo());
|
||||
if (paymentResource.getResource().isSetClientInfo()) {
|
||||
payment.setPayerIpAddress(paymentResource.getResource().getClientInfo().getIpAddress());
|
||||
payment.setPayerFingerprint(paymentResource.getResource().getClientInfo().getFingerprint());
|
||||
}
|
||||
} else if (payer.isSetCustomer()) {
|
||||
CustomerPayer customer = payer.getCustomer();
|
||||
payment.setPayerCustomerId(customer.getCustomerId());
|
||||
payment.setPayerCustomerBindingId(customer.getCustomerBindingId());
|
||||
payment.setPayerCustomerRecPaymentToolId(customer.getRecPaymentToolId());
|
||||
fillPaymentTool(payment, customer.getPaymentTool());
|
||||
fillContactInfo(payment, customer.getContactInfo());
|
||||
} else if (payer.isSetRecurrent()) {
|
||||
payment.setPayerRecurrentParentInvoiceId(payer.getRecurrent().getRecurrentParent().getInvoiceId());
|
||||
payment.setPayerRecurrentParentPaymentId(payer.getRecurrent().getRecurrentParent().getPaymentId());
|
||||
fillPaymentTool(payment, payer.getRecurrent().getPaymentTool());
|
||||
fillContactInfo(payment, payer.getRecurrent().getContactInfo());
|
||||
}
|
||||
payment.setPaymentFlowType(TBaseUtil.unionFieldToEnum(invoicePayment.getFlow(), PaymentFlowType.class));
|
||||
if (invoicePayment.getFlow().isSetHold()) {
|
||||
@ -123,16 +129,8 @@ public class InvoicePaymentCreatedHandler extends AbstractInvoicingHandler {
|
||||
payment.setRouteProviderId(invoicePaymentStarted.getRoute().getProvider().getId());
|
||||
payment.setRouteTerminalId(invoicePaymentStarted.getRoute().getTerminal().getId());
|
||||
}
|
||||
if (invoicePayment.isSetIsRecurring()) {
|
||||
payment.setIsRecurring(invoicePayment.isIsRecurring());
|
||||
}
|
||||
if (invoicePayment.isSetRecurrentIntention()) {
|
||||
RecurrentTokenSource recurrentTokenSource = invoicePayment.getRecurrentIntention().getTokenSource();
|
||||
payment.setRecurrentIntentionTokenSource(TBaseUtil.unionFieldToEnum(recurrentTokenSource, com.rbkmoney.newway.domain.enums.RecurrentTokenSource.class));
|
||||
if (recurrentTokenSource.isSetPayment()) {
|
||||
payment.setRecurrentIntentionTokenSourceInvoiceId(recurrentTokenSource.getPayment().getInvoiceId());
|
||||
payment.setRecurrentIntentionTokenSourcePaymentId(recurrentTokenSource.getPayment().getPaymentId());
|
||||
}
|
||||
if (invoicePayment.isSetMakeRecurrent()) {
|
||||
payment.setMakeRecurrent(invoicePayment.isMakeRecurrent());
|
||||
}
|
||||
|
||||
long pmntId = paymentDao.save(payment);
|
||||
|
@ -1,7 +0,0 @@
|
||||
CREATE TYPE nw.recurrent_token_source AS ENUM ('payment');
|
||||
|
||||
ALTER TABLE nw.payment ADD COLUMN is_recurring BOOL;
|
||||
ALTER TABLE nw.payment ADD COLUMN recurrent_intention_token_source nw.recurrent_token_source;
|
||||
ALTER TABLE nw.payment ADD COLUMN recurrent_intention_token_source_invoice_id CHARACTER VARYING;
|
||||
ALTER TABLE nw.payment ADD COLUMN recurrent_intention_token_source_payment_id CHARACTER VARYING;
|
||||
ALTER TABLE nw.payment ADD COLUMN recurrent_intention_token CHARACTER VARYING;
|
@ -0,0 +1 @@
|
||||
ALTER TYPE nw.payer_type ADD VALUE 'recurrent';
|
4
src/main/resources/db/migration/V9__recurrents.sql
Normal file
4
src/main/resources/db/migration/V9__recurrents.sql
Normal file
@ -0,0 +1,4 @@
|
||||
ALTER TABLE nw.payment ADD COLUMN make_recurrent BOOL;
|
||||
ALTER TABLE nw.payment ADD COLUMN payer_recurrent_parent_invoice_id CHARACTER VARYING;
|
||||
ALTER TABLE nw.payment ADD COLUMN payer_recurrent_parent_payment_id CHARACTER VARYING;
|
||||
ALTER TABLE nw.payment ADD COLUMN recurrent_intention_token CHARACTER VARYING;
|
Loading…
Reference in New Issue
Block a user