<?php
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
use DateTime;
/**
* AddOns
*
* @ORM\Entity(repositoryClass="App\AppBundle\MainBundle\Repository\Orders_MonthlyRepository")
* @ORM\Table(name="orders_monthly")
* @ORM\HasLifecycleCallbacks()
*/
class Orders_Monthly implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Orders
* @ORM\ManyToOne(targetEntity="Orders", inversedBy="ordersMonthly")
* @ORM\JoinColumn(name="order_id", referencedColumnName="id")
*/
private $order;
/**
* @var PromoCodes
* @ORM\ManyToOne(targetEntity="PromoCodes")
* @ORM\JoinColumn(name="promo_code_id", referencedColumnName="id", nullable=true)
*/
private $promo_code;
/**
* @var PS_Add_Spot
* @ORM\ManyToOne(targetEntity="PS_Add_Spot")
* @ORM\JoinColumn(name="add_spot_id", referencedColumnName="id")
*/
private $add_spot;
/**
* @var Orders_Suppliers_Transfer
* @ORM\OneToOne(targetEntity="Orders_Suppliers_Transfer", mappedBy="order_monthly")
*/
private $order_supplier_transfer;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_completed;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $start_date;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $end_date;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_order_paid;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_notification_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 1})
* @Assert\NotBlank()
*/
private $active;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_completion_email_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_completion_sms_sent;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_completion_notification_sent;
/**
* @var WP_Payment
* @ORM\ManyToOne(targetEntity="WP_Payment")
* @ORM\JoinColumn(name="wp_payment_id", referencedColumnName="id", nullable=true)
*/
private $wp_payment;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $payment_method_type;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_stripe_customer_id;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_stripe_card_id;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_stripe_payment_intent_id;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_name;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_card_type;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_last_four;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_brand;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_expiry_month;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pay_expiry_year;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=false)
* @Assert\NotBlank()
*/
private $pay_date;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
* @Assert\NotBlank()
*/
private $sub_total_price;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
* @Assert\NotBlank()
*/
private $tax_price;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
* @Assert\NotBlank()
*/
private $service_fee_price;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
* @Assert\NotBlank()
*/
private $total_price;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $stripe_charge_id;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $is_payout_completed = false;
private $isDataDecrypted = false;
private $renewalDate;//This is stored in Orders Entity. We will only pass value here for webservice purpose
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_balance_transaction;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $stripe_total_amount;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $stripe_fee_amount;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_currency;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_exchange_rate;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $stripe_net_amount;
/**
* @var string
* @ORM\Column(type="string", nullable=true, length=2000)
*/
private $stripe_fee_details;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
*/
private $is_stripe_balance_transaction_details_updated = false;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
*/
private $is_discount_applicable = false;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $discount_total = 0;
/**
* @ORM\Column(type="string", length = 1000, nullable=true)
*/
private $invoice;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $without_discount_sub_total_price = 0;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $without_discount_tax_price = 0;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $without_discount_service_fee_price = 0;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $without_discount_total_price = 0;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $pay_stripe_payment_method_id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_payment_failure_code;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_payment_failure_msg;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $stripe_payment_event_id;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*/
private $payment_failed_date;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*/
private $next_payment_failed_reminder_date;
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*/
private $repayment_failed_last_try_date;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $make_failed_payment_id;//This is unique id that we will generate to get users details and orders details and allow user to make payment on web ui
/**
* @var DateTime
* @ORM\Column(type="datetime", nullable=true)
*/
private $repayment_success_date;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return Orders
*/
public function getOrder()
{
return $this->order;
}
/**
* @param mixed $order
*/
public function setOrder($order)
{
$this->order = $order;
}
/**
* @return PS_Add_Spot
*/
public function getAddSpot()
{
return $this->add_spot;
}
/**
* @param mixed $add_spot
*/
public function setAddSpot($add_spot)
{
$this->add_spot = $add_spot;
}
/**
* @return boolean
*/
public function getIsCompleted()
{
return $this->is_completed;
}
/**
* @param mixed $is_completed
*/
public function setIsCompleted($is_completed)
{
$this->is_completed = $is_completed;
}
/**
* @return DateTime
*/
public function getStartDate()
{
return $this->start_date;
}
/**
* @param mixed $start_date
*/
public function setStartDate($start_date)
{
$this->start_date = $start_date;
}
/**
* @return DateTime
*/
public function getEndDate()
{
return $this->end_date;
}
/**
* @param mixed $end_date
*/
public function setEndDate($end_date)
{
$this->end_date = $end_date;
}
/**
* @return boolean
*/
public function getIsOrderPaid()
{
return $this->is_order_paid;
}
/**
* @param mixed $is_order_paid
*/
public function setIsOrderPaid($is_order_paid)
{
$this->is_order_paid = $is_order_paid;
}
/**
* @return boolean
*/
public function getIsEmailSent()
{
return $this->is_email_sent;
}
/**
* @param mixed $is_email_sent
*/
public function setIsEmailSent($is_email_sent)
{
$this->is_email_sent = $is_email_sent;
}
/**
* @return boolean
*/
public function getIsSmsSent()
{
return $this->is_sms_sent;
}
/**
* @param mixed $is_sms_sent
*/
public function setIsSmsSent($is_sms_sent)
{
$this->is_sms_sent = $is_sms_sent;
}
/**
* @return boolean
*/
public function getIsNotificationSent()
{
return $this->is_notification_sent;
}
/**
* @param mixed $is_notification_sent
*/
public function setIsNotificationSent($is_notification_sent)
{
$this->is_notification_sent = $is_notification_sent;
}
/**
* @return boolean
*/
public function getActive()
{
return $this->active;
}
/**
* @param mixed $active
*/
public function setActive($active)
{
$this->active = $active;
}
/**
* @return boolean
*/
public function getIsCompletionEmailSent()
{
return $this->is_completion_email_sent;
}
/**
* @param mixed $is_completion_email_sent
*/
public function setIsCompletionEmailSent($is_completion_email_sent)
{
$this->is_completion_email_sent = $is_completion_email_sent;
}
/**
* @return boolean
*/
public function getIsCompletionSmsSent()
{
return $this->is_completion_sms_sent;
}
/**
* @param mixed $is_completion_sms_sent
*/
public function setIsCompletionSmsSent($is_completion_sms_sent)
{
$this->is_completion_sms_sent = $is_completion_sms_sent;
}
/**
* @return boolean
*/
public function getIsCompletionNotificationSent()
{
return $this->is_completion_notification_sent;
}
/**
* @param mixed $is_completion_notification_sent
*/
public function setIsCompletionNotificationSent($is_completion_notification_sent)
{
$this->is_completion_notification_sent = $is_completion_notification_sent;
}
/**
* @return WP_Payment
*/
public function getWpPayment()
{
return $this->wp_payment;
}
/**
* @param WP_Payment $wp_payment
*/
public function setWpPayment(WP_Payment $wp_payment)
{
$this->wp_payment = $wp_payment;
}
/**
* @return string
*/
public function getPayName()
{
return $this->pay_name;
}
/**
* @param mixed $pay_name
*/
public function setPayName($pay_name)
{
$this->pay_name = $pay_name;
}
/**
* @return string
*/
public function getPayCardType()
{
return $this->pay_card_type;
}
/**
* @param mixed $pay_card_type
*/
public function setPayCardType($pay_card_type)
{
$this->pay_card_type = $pay_card_type;
}
/**
* @return string
*/
public function getPayLastFour()
{
return $this->pay_last_four;
}
/**
* @param mixed $pay_last_four
*/
public function setPayLastFour($pay_last_four)
{
$this->pay_last_four = $pay_last_four;
}
/**
* @return string
*/
public function getPayBrand()
{
return $this->pay_brand;
}
/**
* @param mixed $pay_brand
*/
public function setPayBrand($pay_brand)
{
$this->pay_brand = $pay_brand;
}
/**
* @return string
*/
public function getPayExpiryMonth()
{
return $this->pay_expiry_month;
}
/**
* @param mixed $pay_expiry_month
*/
public function setPayExpiryMonth($pay_expiry_month)
{
$this->pay_expiry_month = $pay_expiry_month;
}
/**
* @return string
*/
public function getPayExpiryYear()
{
return $this->pay_expiry_year;
}
/**
* @param mixed $pay_expiry_year
*/
public function setPayExpiryYear($pay_expiry_year)
{
$this->pay_expiry_year = $pay_expiry_year;
}
/**
* @return DateTime
*/
public function getPayDate()
{
return $this->pay_date;
}
/**
* @param mixed $pay_date
*/
public function setPayDate($pay_date)
{
$this->pay_date = $pay_date;
}
/**
* @return mixed
*/
public function getSubTotalPrice()
{
return $this->sub_total_price;
}
/**
* @param mixed $sub_total_price
*/
public function setSubTotalPrice($sub_total_price)
{
$this->sub_total_price = $sub_total_price;
}
/**
* @return mixed
*/
public function getTaxPrice()
{
return $this->tax_price;
}
/**
* @param mixed $tax_price
*/
public function setTaxPrice($tax_price)
{
$this->tax_price = $tax_price;
}
/**
* @return mixed
*/
public function getServiceFeePrice()
{
return $this->service_fee_price;
}
/**
* @param mixed $service_fee_price
*/
public function setServiceFeePrice($service_fee_price)
{
$this->service_fee_price = $service_fee_price;
}
/**
* @return mixed
*/
public function getTotalPrice()
{
return $this->total_price;
}
/**
* @param mixed $total_price
*/
public function setTotalPrice($total_price)
{
$this->total_price = $total_price;
}
/**
* @return mixed
*/
public function getStripeChargeId()
{
return $this->stripe_charge_id;
}
/**
* @param mixed $stripe_charge_id
*/
public function setStripeChargeId($stripe_charge_id)
{
$this->stripe_charge_id = $stripe_charge_id;
}
/**
* @return Orders_Suppliers_Transfer
*/
public function getOrderSupplierTransfer()
{
return $this->order_supplier_transfer;
}
/**
* @param Orders_Suppliers_Transfer $order_supplier_transfer
*/
public function setOrderSupplierTransfer(Orders_Suppliers_Transfer $order_supplier_transfer)
{
$this->order_supplier_transfer = $order_supplier_transfer;
}
/**
* @return bool
*/
public function isDataDecrypted(): bool
{
return $this->isDataDecrypted;
}
/**
* @param bool $isDataDecrypted
*/
public function setIsDataDecrypted(bool $isDataDecrypted)
{
$this->isDataDecrypted = $isDataDecrypted;
}
/**
* @return mixed
*/
public function getRenewalDate()
{
return $this->renewalDate;
}
/**
* @param mixed $renewalDate
*/
public function setRenewalDate($renewalDate)
{
$this->renewalDate = $renewalDate;
}
/**
* @return mixed
*/
public function getIsPayoutCompleted()
{
return $this->is_payout_completed;
}
/**
* @param mixed $is_payout_completed
*/
public function setIsPayoutCompleted($is_payout_completed)
{
$this->is_payout_completed = $is_payout_completed;
}
/**
* @return string
*/
public function getStripeBalanceTransaction()
{
return $this->stripe_balance_transaction;
}
/**
* @param string $stripe_balance_transaction
*/
public function setStripeBalanceTransaction($stripe_balance_transaction)
{
$this->stripe_balance_transaction = $stripe_balance_transaction;
}
/**
* @return mixed
*/
public function getStripeTotalAmount()
{
return $this->stripe_total_amount;
}
/**
* @param mixed $stripe_total_amount
*/
public function setStripeTotalAmount($stripe_total_amount)
{
$this->stripe_total_amount = $stripe_total_amount;
}
/**
* @return mixed
*/
public function getStripeFeeAmount()
{
return $this->stripe_fee_amount;
}
/**
* @param mixed $stripe_fee_amount
*/
public function setStripeFeeAmount($stripe_fee_amount)
{
$this->stripe_fee_amount = $stripe_fee_amount;
}
/**
* @return string
*/
public function getStripeCurrency()
{
return $this->stripe_currency;
}
/**
* @param string $stripe_currency
*/
public function setStripeCurrency($stripe_currency)
{
$this->stripe_currency = $stripe_currency;
}
/**
* @return string
*/
public function getStripeExchangeRate()
{
return $this->stripe_exchange_rate;
}
/**
* @param string $stripe_exchange_rate
*/
public function setStripeExchangeRate($stripe_exchange_rate)
{
$this->stripe_exchange_rate = $stripe_exchange_rate;
}
/**
* @return mixed
*/
public function getStripeNetAmount()
{
return $this->stripe_net_amount;
}
/**
* @param mixed $stripe_net_amount
*/
public function setStripeNetAmount($stripe_net_amount)
{
$this->stripe_net_amount = $stripe_net_amount;
}
/**
* @return string
*/
public function getStripeFeeDetails()
{
return $this->stripe_fee_details;
}
/**
* @param string $stripe_fee_details
*/
public function setStripeFeeDetails($stripe_fee_details)
{
$this->stripe_fee_details = $stripe_fee_details;
}
/**
* @return mixed
*/
public function getIsStripeBalanceTransactionDetailsUpdated()
{
return $this->is_stripe_balance_transaction_details_updated;
}
/**
* @param mixed $is_stripe_balance_transaction_details_updated
*/
public function setIsStripeBalanceTransactionDetailsUpdated($is_stripe_balance_transaction_details_updated)
{
$this->is_stripe_balance_transaction_details_updated = $is_stripe_balance_transaction_details_updated;
}
/**
* @return PromoCodes
*/
public function getPromoCode()
{
return $this->promo_code;
}
/**
* @param PromoCodes $promo_code
*/
public function setPromoCode(PromoCodes $promo_code)
{
$this->promo_code = $promo_code;
}
/**
* @return mixed
*/
public function getIsDiscountApplicable()
{
return $this->is_discount_applicable;
}
/**
* @param mixed $is_discount_applicable
*/
public function setIsDiscountApplicable($is_discount_applicable)
{
$this->is_discount_applicable = $is_discount_applicable;
}
/**
* @return mixed
*/
public function getDiscountTotal()
{
return $this->discount_total;
}
/**
* @param mixed $discount_total
*/
public function setDiscountTotal($discount_total)
{
$this->discount_total = $discount_total;
}
/**
* @param mixed $discount_system_part
*/
public function setDiscountSystemPart($discount_system_part)
{
$this->discount_system_part = $discount_system_part;
}
/**
* @return mixed
*/
public function getInvoice()
{
return $this->invoice;
}
/**
* @param mixed $invoice
*/
public function setInvoice($invoice)
{
$this->invoice = $invoice;
}
/**
* @return mixed
*/
public function getWithoutDiscountSubTotalPrice()
{
return $this->without_discount_sub_total_price;
}
/**
* @param mixed $without_discount_sub_total_price
*/
public function setWithoutDiscountSubTotalPrice($without_discount_sub_total_price)
{
$this->without_discount_sub_total_price = $without_discount_sub_total_price;
}
/**
* @return mixed
*/
public function getWithoutDiscountTaxPrice()
{
return $this->without_discount_tax_price;
}
/**
* @param mixed $without_discount_tax_price
*/
public function setWithoutDiscountTaxPrice($without_discount_tax_price)
{
$this->without_discount_tax_price = $without_discount_tax_price;
}
/**
* @return mixed
*/
public function getWithoutDiscountServiceFeePrice()
{
return $this->without_discount_service_fee_price;
}
/**
* @param mixed $without_discount_service_fee_price
*/
public function setWithoutDiscountServiceFeePrice($without_discount_service_fee_price)
{
$this->without_discount_service_fee_price = $without_discount_service_fee_price;
}
/**
* @return mixed
*/
public function getWithoutDiscountTotalPrice()
{
return $this->without_discount_total_price;
}
/**
* @param mixed $without_discount_total_price
*/
public function setWithoutDiscountTotalPrice($without_discount_total_price)
{
$this->without_discount_total_price = $without_discount_total_price;
}
/**
* @return mixed
*/
public function getPaymentMethodType()
{
return $this->payment_method_type;
}
/**
* @param mixed $payment_method_type
*/
public function setPaymentMethodType($payment_method_type)
{
$this->payment_method_type = $payment_method_type;
}
/**
* @return mixed
*/
public function getPayStripePaymentIntentId()
{
return $this->pay_stripe_payment_intent_id;
}
/**
* @param mixed $pay_stripe_payment_intent_id
*/
public function setPayStripePaymentIntentId($pay_stripe_payment_intent_id)
{
$this->pay_stripe_payment_intent_id = $pay_stripe_payment_intent_id;
}
/**
* @return mixed
*/
public function getPayStripeCustomerId()
{
return $this->pay_stripe_customer_id;
}
/**
* @param mixed $pay_stripe_customer_id
*/
public function setPayStripeCustomerId($pay_stripe_customer_id)
{
$this->pay_stripe_customer_id = $pay_stripe_customer_id;
}
/**
* @return mixed
*/
public function getPayStripeCardId()
{
return $this->pay_stripe_card_id;
}
/**
* @param mixed $pay_stripe_card_id
*/
public function setPayStripeCardId($pay_stripe_card_id)
{
$this->pay_stripe_card_id = $pay_stripe_card_id;
}
/**
* @return mixed
*/
public function getPayStripePaymentMethodId()
{
return $this->pay_stripe_payment_method_id;
}
/**
* @param mixed $pay_stripe_payment_method_id
*/
public function setPayStripePaymentMethodId($pay_stripe_payment_method_id)
{
$this->pay_stripe_payment_method_id = $pay_stripe_payment_method_id;
}
/**
* @return mixed
*/
public function getStripePaymentFailureCode()
{
return $this->stripe_payment_failure_code;
}
/**
* @param mixed $stripe_payment_failure_code
*/
public function setStripePaymentFailureCode($stripe_payment_failure_code)
{
$this->stripe_payment_failure_code = $stripe_payment_failure_code;
}
/**
* @return mixed
*/
public function getStripePaymentFailureMsg()
{
return $this->stripe_payment_failure_msg;
}
/**
* @param mixed $stripe_payment_failure_msg
*/
public function setStripePaymentFailureMsg($stripe_payment_failure_msg)
{
$this->stripe_payment_failure_msg = $stripe_payment_failure_msg;
}
/**
* @return mixed
*/
public function getStripePaymentEventId()
{
return $this->stripe_payment_event_id;
}
/**
* @param mixed $stripe_payment_event_id
*/
public function setStripePaymentEventId($stripe_payment_event_id)
{
$this->stripe_payment_event_id = $stripe_payment_event_id;
}
/**
* @return DateTime
*/
public function getPaymentFailedDate()
{
return $this->payment_failed_date;
}
/**
* @param DateTime $payment_failed_date
*/
public function setPaymentFailedDate(DateTime $payment_failed_date)
{
$this->payment_failed_date = $payment_failed_date;
}
/**
* @return DateTime
*/
public function getNextPaymentFailedReminderDate()
{
return $this->next_payment_failed_reminder_date;
}
/**
* @param DateTime $next_payment_failed_reminder_date
*/
public function setNextPaymentFailedReminderDate(DateTime $next_payment_failed_reminder_date)
{
$this->next_payment_failed_reminder_date = $next_payment_failed_reminder_date;
}
/**
* @return DateTime
*/
public function getRepaymentFailedLastTryDate()
{
return $this->repayment_failed_last_try_date;
}
/**
* @param DateTime $repayment_failed_last_try_date
*/
public function setRepaymentFailedLastTryDate(DateTime $repayment_failed_last_try_date)
{
$this->repayment_failed_last_try_date = $repayment_failed_last_try_date;
}
/**
* @return mixed
*/
public function getMakeFailedPaymentId()
{
return $this->make_failed_payment_id;
}
/**
* @param mixed $make_failed_payment_id
*/
public function setMakeFailedPaymentId($make_failed_payment_id)
{
$this->make_failed_payment_id = $make_failed_payment_id;
}
/**
* @return DateTime
*/
public function getRepaymentSuccessDate()
{
return $this->repayment_success_date;
}
/**
* @param DateTime $repayment_success_date
*/
public function setRepaymentSuccessDate(DateTime $repayment_success_date)
{
$this->repayment_success_date = $repayment_success_date;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'is_completed' => $this->is_completed,
'start_date' => $this->start_date->format('Y-m-d'),
'end_date' => $this->end_date->format('Y-m-d'),
'is_order_paid' => $this->is_order_paid,
'is_email_sent' => $this->is_email_sent,
'is_sms_sent' => $this->is_sms_sent,
'is_notification_sent' => $this->is_notification_sent,
'wp_payment_id' => $this->getWpPayment() != NULL ? $this->getWpPayment() ->getId() : '',
'pay_name' => $this->pay_name,
'pay_brand' => $this->pay_brand,
'pay_card_type' => $this->pay_card_type,
'pay_last_four' => $this->pay_last_four,
'is_completion_email_sent' => $this->is_completion_email_sent,
'is_completion_sms_sent' => $this->is_completion_sms_sent,
'is_completion_notification_sent' => $this->is_completion_notification_sent,
'pay_date' => $this->pay_date->format('Y-m-d H:i:s'),
'active' => $this->active,
'sub_total_price' => $this->sub_total_price,
'tax_price' => $this->tax_price,
'service_fee_price' => $this->service_fee_price,
'total_price' => $this->total_price,
'stripe_charge_id' => $this->stripe_charge_id,
'renewal_date' => $this->renewalDate,
'is_payout_completed' => $this->is_payout_completed,
'stripe_balance_transaction' => $this->stripe_balance_transaction,
'stripe_currency' => $this->stripe_currency,
'stripe_exchange_rate' => $this->stripe_exchange_rate,
'stripe_fee_amount' => $this->stripe_fee_amount,
'stripe_total_amount' => $this->stripe_total_amount,
'stripe_net_amount' => $this->stripe_net_amount,
'is_discount_applicable' => $this->is_discount_applicable,
'discount_total' => $this->discount_total,
'without_discount_service_fee_price' => $this->without_discount_service_fee_price,
'without_discount_sub_total_price' => $this->without_discount_sub_total_price,
'without_discount_tax_price' => $this->without_discount_tax_price,
'without_discount_total_price' => $this->without_discount_total_price,
'repayment_failed_last_try_date' => $this->repayment_failed_last_try_date != NULL ? $this->repayment_failed_last_try_date->format('Y-m-d') : '',
'repayment_success_date' => $this->repayment_success_date != NULL ? $this->repayment_success_date->format('Y-m-d H:i:s') : '',
'next_payment_failed_reminder_date' => $this->next_payment_failed_reminder_date != NULL ? $this->next_payment_failed_reminder_date->format('Y-m-d H:i:s') : '',
'promo_code' => $this->getPromoCode() != NULL ? $this->getPromoCode()->jsonSerialize() : NULL,
'is_stripe_balance_transaction_details_updated' => $this->is_stripe_balance_transaction_details_updated,
'invoice' => $this->invoice,
);
}
/**
* @var DateTime $created
*
* @ORM\Column(type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var DateTime $updated
*
* @ORM\Column(type="datetime", nullable=false)
*/
protected $updatedAt;
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new DateTime();
$this->updatedAt = new DateTime();
return $this;
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAtValue() {
$this->updatedAt = new DateTime();
}
public function __construct() {
}
}