id; } /** * Gets charge created time * * @return DateTime */ public function get_created() { return $this->created; } /** * Gets intention status * * @return string */ public function get_status() { return $this->status; } /** * Returns the client secret associated with this intention * * @return string */ public function get_client_secret() { return $this->client_secret; } /** * Returns the customer ID of this intention * * @return string|null */ public function get_customer_id() { return $this->customer_id; } /** * Returns the payment method ID of this intention * * @return string|null */ public function get_payment_method_id() { return $this->payment_method_id; } /** * Returns the next action of this intention * * @return array */ public function get_next_action() { return $this->next_action; } /** * Returns the metadata associated with this intention * * @return array */ public function get_metadata() { return $this->metadata; } /** * Returns the payment_method_types state of this intention * * @return array */ public function get_payment_method_types() { return $this->payment_method_types; } /** * Returns the order data associated with this intention * * @return array */ public function get_order() { return $this->order; } /** * Returns the payment method options associated with this intention * * @return array */ public function get_payment_method_options() { return $this->payment_method_options; } /** * Return the payment method type used in the intent that is derived from property `payment_method_options`. * * @return string|null */ public function get_payment_method_type() { $keys = count( (array) $this->payment_method_options ) > 0 ? array_keys( $this->payment_method_options ) : null; return $keys ? $keys[0] : null; } /** * Returns whether the intention is in one of the authorized statuses. * * @return bool */ public function is_authorized(): bool { return in_array( $this->status, Intent_Status::AUTHORIZED_STATUSES, true ); } /** * Defines which data will be serialized to JSON */ abstract public function jsonSerialize(): array; }