manifest; } public function supports( CommerceContext $context ): bool { if ( 'BA' !== strtoupper( (string) $context->merchant()->get( 'country', '' ) ) ) { return false; } if ( 'B2C' !== strtoupper( (string) $context->transaction()->get( 'business_model', '' ) ) ) { return false; } if ( 'PHYSICAL_GOODS' !== strtoupper( (string) $context->transaction()->get( 'transaction_type', '' ) ) ) { return false; } $establishment = strtoupper( (string) $context->merchant()->get( 'establishment', '' ) ); $sells_across = (bool) $context->transaction()->get( 'sells_across_bih', false ); $cross_mode = strtoupper( (string) $context->transaction()->get( 'cross_entity_mode', '' ) ); switch ( $this->applicability ) { case 'FBIH_MERCHANT': return 'FBIH' === $establishment; case 'RS_MERCHANT': return 'RS' === $establishment; case 'BD_MERCHANT': return 'BD' === $establishment; case 'RS_CONSUMER_CANDIDATE': return 'RS' === $establishment || ( $sells_across && 'PRECAUTIONARY_UNION' === $cross_mode ); default: return true; } } public function get_obligations( CommerceContext $context ): array { unset( $context ); return $this->obligations; } public function get_overrides( CommerceContext $context ): array { unset( $context ); return array(); } public function get_validators(): array { return $this->validators; } }