PluginProbe
Tiered Pricing Table for WooCommerce / 2.1.1
Tiered Pricing Table for WooCommerce v2.1.1
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
tier-pricing-table / freemius / includes / entities / class-fs-payment.php

class-fs-payment.php in Tiered Pricing Table for WooCommerce 2.1.1, at freemius/includes/entities/class-fs-payment.php

110 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2016, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.0
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 class FS_Payment extends FS_Entity {
14
15 #region Properties
16
17 /**
18 * @var number
19 */
20 public $plugin_id;
21 /**
22 * @var number
23 */
24 public $user_id;
25 /**
26 * @var number
27 */
28 public $install_id;
29 /**
30 * @var number
31 */
32 public $subscription_id;
33 /**
34 * @var number
35 */
36 public $plan_id;
37 /**
38 * @var number
39 */
40 public $license_id;
41 /**
42 * @var float
43 */
44 public $gross;
45 /**
46 * @var number
47 */
48 public $bound_payment_id;
49 /**
50 * @var string
51 */
52 public $external_id;
53 /**
54 * @var string
55 */
56 public $gateway;
57 /**
58 * @var string ISO 3166-1 alpha-2 - two-letter country code.
59 *
60 * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
61 */
62 public $country_code;
63 /**
64 * @var string
65 */
66 public $vat_id;
67 /**
68 * @var float Actual Tax / VAT in $$$
69 */
70 public $vat;
71 /**
72 * @var int Payment source.
73 */
74 public $source = 0;
75
76 #endregion Properties
77
78 /**
79 * @param object|bool $payment
80 */
81 function __construct( $payment = false ) {
82 parent::__construct( $payment );
83 }
84
85 static function get_type() {
86 return 'payment';
87 }
88
89 /**
90 * @author Vova Feldman (@svovaf)
91 * @since 1.0.0
92 *
93 * @return bool
94 */
95 function is_refund() {
96 return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
97 }
98
99 /**
100 * Checks if the payment was migrated from another platform.
101 *
102 * @author Vova Feldman (@svovaf)
103 * @since 2.0.2
104 *
105 * @return bool
106 */
107 function is_migrated() {
108 return ( 0 != $this->source );
109 }
110 }