public function get_by_code( $code, $args = array() ) {

		$this->set_request_args( array(
			'method' => 'GET',
			'path'   => array( 'code', urlencode( $code ) ),
			'params' => $args,
		) );

		return $this->do_request();
	}
public function get_by_code( $code, $args = array() ) {

		$this->set_request_args( array(
			'method' => 'GET',
			'path'   => array( 'code', urlencode( $code ) ),
			'params' => $args,
		) );

		return $this->do_request();
	}
public function get_by_code ( $ code , $ args = array ( ) ) { $ this -> set_request_args ( array ( 'method' => 'GET' , 'path' => array ( 'code' , urlencode ( $ code ) ) , 'params' => $ args , ) ) ; return $ this -> do_request ( ) ; }
Get coupon by code

GET /coupons/code/{code}

@since 2.0
@param string $code coupon code
@param array $args acceptable coupon code lookup endpoint args, currently only `fields`
@return array|object coupon!
Get coupon by code