| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * This source file is subject to the GNU General Public License v3.0 |
| 6 | 6 | * that is bundled with this package in the file license.txt. |
| 7 | 7 | * It is also available through the world-wide-web at this URL: |
| 8 | - * http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 or later | |
| 8 | + * http://www.gnu.org/licenses/gpl-3.0.html | |
| 9 | 9 | * If you did not receive a copy of the license and are unable to |
| 10 | 10 | * obtain it through the world-wide-web, please send an email |
| 11 | 11 | * to license@woocommerce.com so we can send you a copy immediately. |
| 12 | 12 | * |
| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | * needs please refer to https://docs.woocommerce.com/document/woocommerce-square/ |
| 18 | 18 | * |
| 19 | 19 | * @author WooCommerce |
| 20 | 20 | * @copyright Copyright: (c) 2019, Automattic, Inc. |
| 21 | - * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 or later | |
| 21 | + * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 | |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | namespace WooCommerce\Square\API; |
| 25 | 25 | |
| @@ -109,8 +109,10 @@ | ||
| 109 | 109 | /** |
| 110 | 110 | * Gets the HTTP method. |
| 111 | 111 | * |
| 112 | 112 | * @since 2.0.0 |
| 113 | + * | |
| 114 | + * @return string | |
| 113 | 115 | */ |
| 114 | 116 | public function get_method() { |
| 115 | 117 | // TODO: Implement get_method() method. |
| 116 | 118 | } |
| @@ -119,8 +121,10 @@ | ||
| 119 | 121 | /** |
| 120 | 122 | * Gets the query parameters. |
| 121 | 123 | * |
| 122 | 124 | * @since 2.0.0 |
| 125 | + * | |
| 126 | + * @return array | |
| 123 | 127 | */ |
| 124 | 128 | public function get_params() { |
| 125 | 129 | // TODO: Implement get_params() method. |
| 126 | 130 | } |
| @@ -129,8 +133,10 @@ | ||
| 129 | 133 | /** |
| 130 | 134 | * Gets the path. |
| 131 | 135 | * |
| 132 | 136 | * @since 2.0.0 |
| 137 | + * | |
| 138 | + * @return string | |
| 133 | 139 | */ |
| 134 | 140 | public function get_path() { |
| 135 | 141 | // TODO: Implement get_path() method. |
| 136 | 142 | } |
| @@ -139,8 +145,10 @@ | ||
| 139 | 145 | /** |
| 140 | 146 | * Gets the request data. |
| 141 | 147 | * |
| 142 | 148 | * @since 2.0.0 |
| 149 | + * | |
| 150 | + * @return array | |
| 143 | 151 | */ |
| 144 | 152 | public function get_data() { |
| 145 | 153 | // TODO: Implement get_data() method. |
| 146 | 154 | } |
| @@ -168,10 +176,8 @@ | ||
| 168 | 176 | foreach ( $this->square_api_args as $key => $arg ) { |
| 169 | 177 | |
| 170 | 178 | if ( is_callable( array( $arg, '__toString' ) ) ) { |
| 171 | 179 | $body[ $key ] = $arg->__toString(); |
| 172 | - } elseif ( $arg instanceof \JsonSerializable ) { | |
| 173 | - $body[ $key ] = wp_json_encode( $arg ); | |
| 174 | 180 | } |
| 175 | 181 | } |
| 176 | 182 | |
| 177 | 183 | $body = implode( ',', $body ); |